aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/server/game.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/game.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/game.cpp')
-rw-r--r--mp/src/game/server/game.cpp222
1 files changed, 111 insertions, 111 deletions
diff --git a/mp/src/game/server/game.cpp b/mp/src/game/server/game.cpp
index 8cc79541..c22f7ebd 100644
--- a/mp/src/game/server/game.cpp
+++ b/mp/src/game/server/game.cpp
@@ -1,111 +1,111 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-// $NoKeywords: $
-//
-//=============================================================================//
-#include "cbase.h"
-#include "game.h"
-#include "physics.h"
-
-// memdbgon must be the last include file in a .cpp file!!!
-#include "tier0/memdbgon.h"
-
-void MapCycleFileChangedCallback( IConVar *var, const char *pOldString, float flOldValue )
-{
- if ( Q_stricmp( pOldString, mapcyclefile.GetString() ) != 0 )
- {
- if ( GameRules() )
- {
- // For multiplayer games, forces the mapcyclefile to be reloaded
- GameRules()->ResetMapCycleTimeStamp();
- }
- }
-}
-
-ConVar displaysoundlist( "displaysoundlist","0" );
-ConVar mapcyclefile( "mapcyclefile", "mapcycle.txt", FCVAR_NONE, "Name of the .txt file used to cycle the maps on multiplayer servers ", MapCycleFileChangedCallback );
-ConVar servercfgfile( "servercfgfile","server.cfg" );
-ConVar lservercfgfile( "lservercfgfile","listenserver.cfg" );
-
-// multiplayer server rules
-ConVar teamplay( "mp_teamplay","0", FCVAR_NOTIFY );
-ConVar falldamage( "mp_falldamage","0", FCVAR_NOTIFY );
-ConVar weaponstay( "mp_weaponstay","0", FCVAR_NOTIFY );
-ConVar forcerespawn( "mp_forcerespawn","1", FCVAR_NOTIFY );
-ConVar footsteps( "mp_footsteps","1", FCVAR_NOTIFY );
-#ifdef CSTRIKE
-ConVar flashlight( "mp_flashlight","1", FCVAR_NOTIFY );
-#else
-ConVar flashlight( "mp_flashlight","0", FCVAR_NOTIFY );
-#endif
-ConVar aimcrosshair( "mp_autocrosshair","1", FCVAR_NOTIFY );
-ConVar decalfrequency( "decalfrequency","10", FCVAR_NOTIFY );
-ConVar teamlist( "mp_teamlist","hgrunt;scientist", FCVAR_NOTIFY );
-ConVar teamoverride( "mp_teamoverride","1" );
-ConVar defaultteam( "mp_defaultteam","0" );
-ConVar allowNPCs( "mp_allowNPCs","1", FCVAR_NOTIFY );
-
-// Engine Cvars
-const ConVar *g_pDeveloper = NULL;
-
-
-ConVar suitvolume( "suitvolume", "0.25", FCVAR_ARCHIVE );
-
-class CGameDLL_ConVarAccessor : public IConCommandBaseAccessor
-{
-public:
- virtual bool RegisterConCommandBase( ConCommandBase *pCommand )
- {
- // Remember "unlinked" default value for replicated cvars
- bool replicated = pCommand->IsFlagSet( FCVAR_REPLICATED );
- const char *defvalue = NULL;
- if ( replicated && !pCommand->IsCommand() )
- {
- defvalue = ( ( ConVar * )pCommand)->GetDefault();
- }
-
- // Link to engine's list instead
- cvar->RegisterConCommand( pCommand );
-
- // Apply any command-line values.
- const char *pValue = cvar->GetCommandLineValue( pCommand->GetName() );
- if( pValue )
- {
- if ( !pCommand->IsCommand() )
- {
- ( ( ConVar * )pCommand )->SetValue( pValue );
- }
- }
- else
- {
- // NOTE: If not overridden at the command line, then if it's a replicated cvar, make sure that it's
- // value is the server's value. This solves a problem where think_limit is defined in shared
- // code but the value is inside and #if defined( _DEBUG ) block and if you have a debug game .dll
- // and a release client, then the limiit was coming from the client even though the server value
- // was the one that was important during debugging. Now the server trumps the client value for
- // replicated ConVars by setting the value here after the ConVar has been linked.
- if ( replicated && defvalue && !pCommand->IsCommand() )
- {
- ConVar *var = ( ConVar * )pCommand;
- var->SetValue( defvalue );
- }
- }
-
- return true;
- }
-};
-
-static CGameDLL_ConVarAccessor g_ConVarAccessor;
-
-// Register your console variables here
-// This gets called one time when the game is initialied
-void InitializeCvars( void )
-{
- // Register cvars here:
- ConVar_Register( FCVAR_GAMEDLL, &g_ConVarAccessor );
-
- g_pDeveloper = cvar->FindVar( "developer" );
-}
-
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//
+//=============================================================================//
+#include "cbase.h"
+#include "game.h"
+#include "physics.h"
+
+// memdbgon must be the last include file in a .cpp file!!!
+#include "tier0/memdbgon.h"
+
+void MapCycleFileChangedCallback( IConVar *var, const char *pOldString, float flOldValue )
+{
+ if ( Q_stricmp( pOldString, mapcyclefile.GetString() ) != 0 )
+ {
+ if ( GameRules() )
+ {
+ // For multiplayer games, forces the mapcyclefile to be reloaded
+ GameRules()->ResetMapCycleTimeStamp();
+ }
+ }
+}
+
+ConVar displaysoundlist( "displaysoundlist","0" );
+ConVar mapcyclefile( "mapcyclefile", "mapcycle.txt", FCVAR_NONE, "Name of the .txt file used to cycle the maps on multiplayer servers ", MapCycleFileChangedCallback );
+ConVar servercfgfile( "servercfgfile","server.cfg" );
+ConVar lservercfgfile( "lservercfgfile","listenserver.cfg" );
+
+// multiplayer server rules
+ConVar teamplay( "mp_teamplay","0", FCVAR_NOTIFY );
+ConVar falldamage( "mp_falldamage","0", FCVAR_NOTIFY );
+ConVar weaponstay( "mp_weaponstay","0", FCVAR_NOTIFY );
+ConVar forcerespawn( "mp_forcerespawn","1", FCVAR_NOTIFY );
+ConVar footsteps( "mp_footsteps","1", FCVAR_NOTIFY );
+#ifdef CSTRIKE
+ConVar flashlight( "mp_flashlight","1", FCVAR_NOTIFY );
+#else
+ConVar flashlight( "mp_flashlight","0", FCVAR_NOTIFY );
+#endif
+ConVar aimcrosshair( "mp_autocrosshair","1", FCVAR_NOTIFY );
+ConVar decalfrequency( "decalfrequency","10", FCVAR_NOTIFY );
+ConVar teamlist( "mp_teamlist","hgrunt;scientist", FCVAR_NOTIFY );
+ConVar teamoverride( "mp_teamoverride","1" );
+ConVar defaultteam( "mp_defaultteam","0" );
+ConVar allowNPCs( "mp_allowNPCs","1", FCVAR_NOTIFY );
+
+// Engine Cvars
+const ConVar *g_pDeveloper = NULL;
+
+
+ConVar suitvolume( "suitvolume", "0.25", FCVAR_ARCHIVE );
+
+class CGameDLL_ConVarAccessor : public IConCommandBaseAccessor
+{
+public:
+ virtual bool RegisterConCommandBase( ConCommandBase *pCommand )
+ {
+ // Remember "unlinked" default value for replicated cvars
+ bool replicated = pCommand->IsFlagSet( FCVAR_REPLICATED );
+ const char *defvalue = NULL;
+ if ( replicated && !pCommand->IsCommand() )
+ {
+ defvalue = ( ( ConVar * )pCommand)->GetDefault();
+ }
+
+ // Link to engine's list instead
+ cvar->RegisterConCommand( pCommand );
+
+ // Apply any command-line values.
+ const char *pValue = cvar->GetCommandLineValue( pCommand->GetName() );
+ if( pValue )
+ {
+ if ( !pCommand->IsCommand() )
+ {
+ ( ( ConVar * )pCommand )->SetValue( pValue );
+ }
+ }
+ else
+ {
+ // NOTE: If not overridden at the command line, then if it's a replicated cvar, make sure that it's
+ // value is the server's value. This solves a problem where think_limit is defined in shared
+ // code but the value is inside and #if defined( _DEBUG ) block and if you have a debug game .dll
+ // and a release client, then the limiit was coming from the client even though the server value
+ // was the one that was important during debugging. Now the server trumps the client value for
+ // replicated ConVars by setting the value here after the ConVar has been linked.
+ if ( replicated && defvalue && !pCommand->IsCommand() )
+ {
+ ConVar *var = ( ConVar * )pCommand;
+ var->SetValue( defvalue );
+ }
+ }
+
+ return true;
+ }
+};
+
+static CGameDLL_ConVarAccessor g_ConVarAccessor;
+
+// Register your console variables here
+// This gets called one time when the game is initialied
+void InitializeCvars( void )
+{
+ // Register cvars here:
+ ConVar_Register( FCVAR_GAMEDLL, &g_ConVarAccessor );
+
+ g_pDeveloper = cvar->FindVar( "developer" );
+}
+