From 1aff4bb9b9966e5985845d9c187c22a4b8e8258c Mon Sep 17 00:00:00 2001 From: samisalreadytaken <46823719+samisalreadytaken@users.noreply.github.com> Date: Sat, 26 Nov 2022 20:12:35 +0300 Subject: [PATCH] Assert on concommand hook crash --- sp/src/game/shared/mapbase/vscript_singletons.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sp/src/game/shared/mapbase/vscript_singletons.cpp b/sp/src/game/shared/mapbase/vscript_singletons.cpp index c5cca45b..64dcc592 100644 --- a/sp/src/game/shared/mapbase/vscript_singletons.cpp +++ b/sp/src/game/shared/mapbase/vscript_singletons.cpp @@ -2742,6 +2742,11 @@ public: void CScriptConvarAccessor::RegisterCommand( const char *name, HSCRIPT fn, const char *helpString, int flags ) { +#if CLIENT_DLL + // FIXME: This crashes in engine when used as a hook (dispatched from CScriptConCommand::CommandCallback()) + Assert( V_stricmp( name, "load" ) != 0 ); +#endif + unsigned int hash = Hash(name); int idx = g_ScriptConCommands.Find(hash); if ( idx == g_ScriptConCommands.InvalidIndex() )