aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/server/toolframework_server.cpp
diff options
context:
space:
mode:
authorJørgen P. Tjernø <[email protected]>2013-12-02 19:31:46 -0800
committerJørgen P. Tjernø <[email protected]>2013-12-02 19:46:31 -0800
commitf56bb35301836e56582a575a75864392a0177875 (patch)
treede61ddd39de3e7df52759711950b4c288592f0dc /mp/src/game/server/toolframework_server.cpp
parentMark some more files as text. (diff)
downloadsource-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz
source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip
Fix line endings. WHAMMY.
Diffstat (limited to 'mp/src/game/server/toolframework_server.cpp')
-rw-r--r--mp/src/game/server/toolframework_server.cpp276
1 files changed, 138 insertions, 138 deletions
diff --git a/mp/src/game/server/toolframework_server.cpp b/mp/src/game/server/toolframework_server.cpp
index 6b008a99..7bbe2b56 100644
--- a/mp/src/game/server/toolframework_server.cpp
+++ b/mp/src/game/server/toolframework_server.cpp
@@ -1,138 +1,138 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-// $NoKeywords: $
-//
-//===========================================================================//
-#include "cbase.h"
-#include "igamesystem.h"
-#include "toolframework/iserverenginetools.h"
-#include "init_factory.h"
-
-//-----------------------------------------------------------------------------
-// Purpose: This is an autogame system which is used to call back into the engine at appropriate points
-// so that IToolSystems can get these hooks at the correct time
-//-----------------------------------------------------------------------------
-class CToolFrameworkServer : public CAutoGameSystemPerFrame, public IToolFrameworkServer
-{
-public:
- virtual bool Init();
- // Level init, shutdown
- virtual void LevelInitPreEntity();
- // entities are created / spawned / precached here
- virtual void LevelInitPostEntity();
- virtual void LevelShutdownPreEntity();
- // Entities are deleted / released here...
- virtual void LevelShutdownPostEntity();
- // Called each frame before entities think
- virtual void FrameUpdatePreEntityThink();
- // called after entities think
- virtual void FrameUpdatePostEntityThink();
- virtual void PreClientUpdate();
- virtual void PreSetupVisibility();
-
-
- IServerEngineTools *m_pTools;
-};
-
-// Singleton
-static CToolFrameworkServer g_ToolFrameworkServer;
-IToolFrameworkServer *g_pToolFrameworkServer = &g_ToolFrameworkServer;
-
-#ifndef NO_TOOLFRAMEWORK
-
-bool ToolsEnabled()
-{
- return g_ToolFrameworkServer.m_pTools && g_ToolFrameworkServer.m_pTools->InToolMode() && !engine->IsDedicatedServer();
-}
-
-#endif
-
-bool CToolFrameworkServer::Init()
-{
- factorylist_t list;
- FactoryList_Retrieve( list );
-
- // Latch onto internal interface
- m_pTools = ( IServerEngineTools * )list.engineFactory( VSERVERENGINETOOLS_INTERFACE_VERSION, NULL );
-
- if ( !m_pTools && !engine->IsDedicatedServer() )
- {
- return false;
- }
-
- return true;
-}
-
-void CToolFrameworkServer::LevelInitPreEntity()
-{
- if ( !m_pTools )
- {
- return;
- }
- m_pTools->LevelInitPreEntityAllTools();
-}
-
-void CToolFrameworkServer::LevelInitPostEntity()
-{
- if ( !m_pTools )
- {
- return;
- }
- m_pTools->LevelInitPostEntityAllTools();
-}
-
-void CToolFrameworkServer::LevelShutdownPreEntity()
-{
- if ( !m_pTools )
- {
- return;
- }
- m_pTools->LevelShutdownPreEntityAllTools();
-}
-
-void CToolFrameworkServer::LevelShutdownPostEntity()
-{
- if ( !m_pTools )
- {
- return;
- }
- m_pTools->LevelShutdownPostEntityAllTools();
-}
-
-void CToolFrameworkServer::FrameUpdatePreEntityThink()
-{
- if ( !m_pTools )
- {
- return;
- }
- m_pTools->FrameUpdatePreEntityThinkAllTools();
-}
-
-void CToolFrameworkServer::FrameUpdatePostEntityThink()
-{
- if ( !m_pTools )
- {
- return;
- }
- m_pTools->FrameUpdatePostEntityThinkAllTools();
-}
-
-void CToolFrameworkServer::PreClientUpdate()
-{
- if ( !m_pTools )
- {
- return;
- }
- m_pTools->PreClientUpdateAllTools();
-}
-
-void CToolFrameworkServer::PreSetupVisibility()
-{
- if ( !m_pTools )
- {
- return;
- }
- m_pTools->PreSetupVisibilityAllTools();
-}
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//
+//===========================================================================//
+#include "cbase.h"
+#include "igamesystem.h"
+#include "toolframework/iserverenginetools.h"
+#include "init_factory.h"
+
+//-----------------------------------------------------------------------------
+// Purpose: This is an autogame system which is used to call back into the engine at appropriate points
+// so that IToolSystems can get these hooks at the correct time
+//-----------------------------------------------------------------------------
+class CToolFrameworkServer : public CAutoGameSystemPerFrame, public IToolFrameworkServer
+{
+public:
+ virtual bool Init();
+ // Level init, shutdown
+ virtual void LevelInitPreEntity();
+ // entities are created / spawned / precached here
+ virtual void LevelInitPostEntity();
+ virtual void LevelShutdownPreEntity();
+ // Entities are deleted / released here...
+ virtual void LevelShutdownPostEntity();
+ // Called each frame before entities think
+ virtual void FrameUpdatePreEntityThink();
+ // called after entities think
+ virtual void FrameUpdatePostEntityThink();
+ virtual void PreClientUpdate();
+ virtual void PreSetupVisibility();
+
+
+ IServerEngineTools *m_pTools;
+};
+
+// Singleton
+static CToolFrameworkServer g_ToolFrameworkServer;
+IToolFrameworkServer *g_pToolFrameworkServer = &g_ToolFrameworkServer;
+
+#ifndef NO_TOOLFRAMEWORK
+
+bool ToolsEnabled()
+{
+ return g_ToolFrameworkServer.m_pTools && g_ToolFrameworkServer.m_pTools->InToolMode() && !engine->IsDedicatedServer();
+}
+
+#endif
+
+bool CToolFrameworkServer::Init()
+{
+ factorylist_t list;
+ FactoryList_Retrieve( list );
+
+ // Latch onto internal interface
+ m_pTools = ( IServerEngineTools * )list.engineFactory( VSERVERENGINETOOLS_INTERFACE_VERSION, NULL );
+
+ if ( !m_pTools && !engine->IsDedicatedServer() )
+ {
+ return false;
+ }
+
+ return true;
+}
+
+void CToolFrameworkServer::LevelInitPreEntity()
+{
+ if ( !m_pTools )
+ {
+ return;
+ }
+ m_pTools->LevelInitPreEntityAllTools();
+}
+
+void CToolFrameworkServer::LevelInitPostEntity()
+{
+ if ( !m_pTools )
+ {
+ return;
+ }
+ m_pTools->LevelInitPostEntityAllTools();
+}
+
+void CToolFrameworkServer::LevelShutdownPreEntity()
+{
+ if ( !m_pTools )
+ {
+ return;
+ }
+ m_pTools->LevelShutdownPreEntityAllTools();
+}
+
+void CToolFrameworkServer::LevelShutdownPostEntity()
+{
+ if ( !m_pTools )
+ {
+ return;
+ }
+ m_pTools->LevelShutdownPostEntityAllTools();
+}
+
+void CToolFrameworkServer::FrameUpdatePreEntityThink()
+{
+ if ( !m_pTools )
+ {
+ return;
+ }
+ m_pTools->FrameUpdatePreEntityThinkAllTools();
+}
+
+void CToolFrameworkServer::FrameUpdatePostEntityThink()
+{
+ if ( !m_pTools )
+ {
+ return;
+ }
+ m_pTools->FrameUpdatePostEntityThinkAllTools();
+}
+
+void CToolFrameworkServer::PreClientUpdate()
+{
+ if ( !m_pTools )
+ {
+ return;
+ }
+ m_pTools->PreClientUpdateAllTools();
+}
+
+void CToolFrameworkServer::PreSetupVisibility()
+{
+ if ( !m_pTools )
+ {
+ return;
+ }
+ m_pTools->PreSetupVisibilityAllTools();
+}