mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-17 20:10:21 +03:00
Made VBSP's OnMapLoaded into a hook using the new system
This commit is contained in:
@@ -2806,14 +2806,12 @@ bool LoadMapFile( const char *pszFileName )
|
||||
#ifdef MAPBASE_VSCRIPT
|
||||
if ( g_pScriptVM )
|
||||
{
|
||||
HSCRIPT hFunc = g_pScriptVM->LookupFunction( "OnMapLoaded" );
|
||||
if ( hFunc )
|
||||
if (CMapFile::g_Hook_OnMapLoaded.CanRunInScope( NULL ))
|
||||
{
|
||||
// Use GetLoadingMap()
|
||||
//g_pScriptVM->SetValue( "map", g_LoadingMap->GetScriptInstance() );
|
||||
|
||||
g_pScriptVM->Call( hFunc );
|
||||
g_pScriptVM->ReleaseFunction( hFunc );
|
||||
CMapFile::g_Hook_OnMapLoaded.Call( NULL, NULL, NULL );
|
||||
|
||||
//g_pScriptVM->ClearValue( "map" );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user