mirror of
https://github.com/celisej567/BCWSsrc.git
synced 2026-09-21 20:15:08 +03:00
Integrating vscript interface code (based on Alien Swarm)
This commit is contained in:
@@ -93,6 +93,9 @@
|
||||
#include "world.h"
|
||||
#endif
|
||||
|
||||
#include "vscript/ivscript.h"
|
||||
#include "vscript_server.h"
|
||||
|
||||
|
||||
#ifdef TF_DLL
|
||||
#include "gc_clientsystem.h"
|
||||
@@ -185,6 +188,7 @@ IServerEngineTools *serverenginetools = NULL;
|
||||
ISceneFileCache *scenefilecache = NULL;
|
||||
IXboxSystem *xboxsystem = NULL; // Xbox 360 only
|
||||
IMatchmaking *matchmaking = NULL; // Xbox 360 only
|
||||
IScriptManager *scriptmanager = NULL;
|
||||
#if defined( REPLAY_ENABLED )
|
||||
IReplaySystem *g_pReplay = NULL;
|
||||
IServerReplayContext *g_pReplayServerContext = NULL;
|
||||
@@ -627,6 +631,11 @@ bool CServerGameDLL::DLLInit( CreateInterfaceFn appSystemFactory,
|
||||
if ( IsX360() && (matchmaking = (IMatchmaking *)appSystemFactory( VENGINE_MATCHMAKING_VERSION, NULL )) == NULL )
|
||||
return false;
|
||||
|
||||
if (!CommandLine()->CheckParm("-noscripting"))
|
||||
{
|
||||
scriptmanager = (IScriptManager*)appSystemFactory(VSCRIPT_INTERFACE_VERSION, NULL);
|
||||
}
|
||||
|
||||
// If not running dedicated, grab the engine vgui interface
|
||||
if ( !engine->IsDedicatedServer() )
|
||||
{
|
||||
@@ -684,6 +693,7 @@ bool CServerGameDLL::DLLInit( CreateInterfaceFn appSystemFactory,
|
||||
g_pGameSaveRestoreBlockSet->AddBlockHandler( GetCommentarySaveRestoreBlockHandler() );
|
||||
g_pGameSaveRestoreBlockSet->AddBlockHandler( GetEventQueueSaveRestoreBlockHandler() );
|
||||
g_pGameSaveRestoreBlockSet->AddBlockHandler( GetAchievementSaveRestoreBlockHandler() );
|
||||
g_pGameSaveRestoreBlockSet->AddBlockHandler( GetVScriptSaveRestoreBlockHandler() );
|
||||
|
||||
// The string system must init first + shutdown last
|
||||
IGameSystem::Add( GameStringSystem() );
|
||||
@@ -762,6 +772,7 @@ void CServerGameDLL::DLLShutdown( void )
|
||||
// Due to dependencies, these are not autogamesystems
|
||||
ModelSoundsCacheShutdown();
|
||||
|
||||
g_pGameSaveRestoreBlockSet->RemoveBlockHandler( GetVScriptSaveRestoreBlockHandler() );
|
||||
g_pGameSaveRestoreBlockSet->RemoveBlockHandler( GetAchievementSaveRestoreBlockHandler() );
|
||||
g_pGameSaveRestoreBlockSet->RemoveBlockHandler( GetCommentarySaveRestoreBlockHandler() );
|
||||
g_pGameSaveRestoreBlockSet->RemoveBlockHandler( GetEventQueueSaveRestoreBlockHandler() );
|
||||
|
||||
Reference in New Issue
Block a user