Skip to content

Commit

Permalink
Don't check return value of DynamicHook.RemoveHook
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikusch committed Mar 12, 2024
1 parent b957d7c commit 16e0e40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/friendlyfire.sp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <tf2_stocks>
#include <tf2utils>

#define PLUGIN_VERSION "1.2.4"
#define PLUGIN_VERSION "1.2.5"

#define TICK_NEVER_THINK -1.0
#define TF_CUSTOM_NONE 0
Expand Down
3 changes: 1 addition & 2 deletions addons/sourcemod/scripting/friendlyfire/dhooks.sp
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ void DHooks_Toggle(bool enable)
for (int i = g_dynamicHookIds.Length - 1; i >= 0; i--)
{
int hookid = g_dynamicHookIds.Get(i);
if (!DynamicHook.RemoveHook(hookid))
LogError("Failed to remove dynamic hook (ID %d)", hookid);
DynamicHook.RemoveHook(hookid);
}
}
}
Expand Down

0 comments on commit 16e0e40

Please sign in to comment.