Skip to content

Commit

Permalink
Remove ability to skip 'addDebugHook' (#3719)
Browse files Browse the repository at this point in the history
* Remove ability to skip 'addDebugHook'
'addDebugHook' will not be skipped inside another 'addDebugHook'.
  • Loading branch information
PlatinMTA authored Sep 14, 2024
1 parent 961dcac commit 2fecd74
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Shared/mods/deathmatch/logic/CDebugHookManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,8 @@ bool CDebugHookManager::CallHook(const char* szName, const std::vector<SDebugHoo
CLuaArgument* returnedValue = *returnValues.begin();
if (returnedValue->GetType() == LUA_TSTRING)
{
if (returnedValue->GetString() == "skip")
// We don't want to skip the creation of new debug hooks
if (returnedValue->GetString() == "skip" && strcmp(szName, "addDebugHook"))
bSkip = true;
}
}
Expand Down

0 comments on commit 2fecd74

Please sign in to comment.