diff --git a/sp/src/game/shared/mapbase/weapon_custom_scripted.cpp b/sp/src/game/shared/mapbase/weapon_custom_scripted.cpp index 000fe416..33cf3959 100644 --- a/sp/src/game/shared/mapbase/weapon_custom_scripted.cpp +++ b/sp/src/game/shared/mapbase/weapon_custom_scripted.cpp @@ -179,7 +179,7 @@ bool CWeaponCustomScripted::RunWeaponHook( ScriptHook_t &hook, HSCRIPT &cached, { if ( !cached ) { - if ( hook.CanRunInScope( m_ScriptScope ) ) + if ( m_ScriptScope.IsInitialized() && hook.CanRunInScope( m_ScriptScope ) ) { cached = hook.m_hFunc; } @@ -187,6 +187,7 @@ bool CWeaponCustomScripted::RunWeaponHook( ScriptHook_t &hook, HSCRIPT &cached, if (cached) { + hook.m_hFunc = cached; return hook.Call( m_ScriptScope, retVal, pArgs, false ); }