Skip to content

Commit

Permalink
Add a sanity check (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsuza authored Aug 31, 2024
1 parent 99eca7c commit dd9a8d5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release Notes

## [2.0.7]

### Fixes
- Add an additional sanity check in case the TF2EconDynAttribute handle is not valid.

## [2.0.6]

### Fixes
Expand Down
5 changes: 4 additions & 1 deletion scripting/attribute_viewmodel_override.sp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public Plugin myinfo =
name = "[TF2] Attribute: Viewmodel Override",
author = "tsuza",
description = "[TF2] Attributes to modify arms, arms animations, firstperson and thirdparson weapon model.",
version = "2.0.6",
version = "2.0.7",
url = "https://github.com/tsuza/TF2CA-weaponmodel_override"
};

Expand Down Expand Up @@ -121,6 +121,9 @@ void RegisterAttributes()
{
TF2EconDynAttribute attribute = new TF2EconDynAttribute();

if(!attribute)
SetFailState("The TF2EconDynAttribute handle is invalid. Make sure that the extension's gamedata is up-to-date. Aborting...");

attribute.SetDescriptionFormat("value_is_additive");
attribute.SetCustom("attribute_type", "string");

Expand Down

0 comments on commit dd9a8d5

Please sign in to comment.