mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-02-05 10:10:42 +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 ( !cached )
|
||||||
{
|
{
|
||||||
if ( hook.CanRunInScope( m_ScriptScope ) )
|
if ( m_ScriptScope.IsInitialized() && hook.CanRunInScope( m_ScriptScope ) )
|
||||||
{
|
{
|
||||||
cached = hook.m_hFunc;
|
cached = hook.m_hFunc;
|
||||||
}
|
}
|
||||||
@ -187,6 +187,7 @@ bool CWeaponCustomScripted::RunWeaponHook( ScriptHook_t &hook, HSCRIPT &cached,
|
|||||||
|
|
||||||
if (cached)
|
if (cached)
|
||||||
{
|
{
|
||||||
|
hook.m_hFunc = cached;
|
||||||
return hook.Call( m_ScriptScope, retVal, pArgs, false );
|
return hook.Call( m_ScriptScope, retVal, pArgs, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user