mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-27 06:07:56 +03:00
Fix weapon_custom_scripted hook calls
This commit is contained in:
parent
19702d067d
commit
a02f3db05b
@ -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 );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user