mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-04-08 11:01:33 +00:00
Merge 00939cd33e
into 65aa7c910e
This commit is contained in:
commit
8a75304f6f
3 changed files with 18 additions and 2 deletions
|
@ -186,6 +186,9 @@ bool VScriptClientInit()
|
|||
g_pScriptVM->Run( g_Script_vscript_client );
|
||||
}
|
||||
|
||||
// ignore map-packed serverspawn files, allows server owners to run scripts before the map
|
||||
VScriptRunScript( "serverspawn", false );
|
||||
|
||||
VScriptRunScript( "mapspawn", false );
|
||||
|
||||
VMPROF_SHOW( pszScriptLanguage, "virtual machine startup" );
|
||||
|
|
|
@ -3503,6 +3503,9 @@ REGISTER_SCRIPT_CONST_TABLE( Server )
|
|||
}
|
||||
g_VScriptGameEventListener.Init();
|
||||
|
||||
// ignore map-packed serverspawn files, allows server owners to run scripts before the map
|
||||
VScriptRunScript( "serverspawn", false );
|
||||
|
||||
VScriptRunScript( "mapspawn", false );
|
||||
|
||||
if ( script_connect_debugger_on_mapspawn.GetBool() )
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//========== Copyright © 2008, Valve Corporation, All rights reserved. ========
|
||||
//========== Copyright <EFBFBD> 2008, Valve Corporation, All rights reserved. ========
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
|
@ -102,7 +102,17 @@ HSCRIPT VScriptCompileScript( const char *pszScriptName, bool bWarnMissing )
|
|||
}
|
||||
else
|
||||
{
|
||||
bool bResult = filesystem->ReadFile( scriptPath, "GAME", bufferScript );
|
||||
bool bResult = false;
|
||||
|
||||
// ignore map-packed serverspawn files, allows server owners to run scripts before the map
|
||||
if ( V_strcmp( pszScriptName, "serverspawn" ) == 0 || V_strcmp( pszScriptName, CFmtStr( "serverspawn%s", pszVMExtension ) ) == 0 )
|
||||
{
|
||||
bResult = filesystem->ReadFile( scriptPath, "MOD", bufferScript );
|
||||
}
|
||||
else
|
||||
{
|
||||
bResult = filesystem->ReadFile( scriptPath, "GAME", bufferScript );
|
||||
}
|
||||
|
||||
if( !bResult )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue