Refactor script hook system

This commit is contained in:
samisalreadytaken
2022-07-18 22:37:05 +03:00
parent fca05c8be9
commit 22f0b2c3cc
8 changed files with 201 additions and 175 deletions

View File

@@ -1353,7 +1353,7 @@ void C_BaseEntity::Term()
if ( m_hScriptInstance )
{
#ifdef MAPBASE_VSCRIPT
if ( m_ScriptScope.IsInitialized() )
if ( m_ScriptScope.IsInitialized() && g_Hook_UpdateOnRemove.CanRunInScope( m_ScriptScope ) )
{
g_Hook_UpdateOnRemove.Call( m_ScriptScope, NULL, NULL );
}