summaryrefslogtreecommitdiff
path: root/game/server/cstrike/cs_gameinterface.cpp
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/server/cstrike/cs_gameinterface.cpp
downloadarchived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.tar.xz
archived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.zip
Diffstat (limited to 'game/server/cstrike/cs_gameinterface.cpp')
-rw-r--r--game/server/cstrike/cs_gameinterface.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/game/server/cstrike/cs_gameinterface.cpp b/game/server/cstrike/cs_gameinterface.cpp
new file mode 100644
index 0000000..869dc64
--- /dev/null
+++ b/game/server/cstrike/cs_gameinterface.cpp
@@ -0,0 +1,40 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================//
+
+#include "cbase.h"
+#include "gameinterface.h"
+#include "mapentities.h"
+#include "cs_gameinterface.h"
+#include "AI_ResponseSystem.h"
+
+// -------------------------------------------------------------------------------------------- //
+// Mod-specific CServerGameClients implementation.
+// -------------------------------------------------------------------------------------------- //
+
+void CServerGameClients::GetPlayerLimits( int& minplayers, int& maxplayers, int &defaultMaxPlayers ) const
+{
+ minplayers = 1; // allow single player for the test maps (but we default to multi)
+ maxplayers = MAX_PLAYERS;
+
+ defaultMaxPlayers = 32; // Default to 32 players unless they change it.
+}
+
+
+// -------------------------------------------------------------------------------------------- //
+// Mod-specific CServerGameDLL implementation.
+// -------------------------------------------------------------------------------------------- //
+
+void CServerGameDLL::LevelInit_ParseAllEntities( const char *pMapEntities )
+{
+ if ( Q_strcmp( STRING(gpGlobals->mapname), "cs_" ) )
+ {
+ // don't precache AI responses (hostages) if it's not a hostage rescure map
+ extern IResponseSystem *g_pResponseSystem;
+ g_pResponseSystem->PrecacheResponses( false );
+ }
+}
+
+