summaryrefslogtreecommitdiff
path: root/src/cgame/cg_servercmds.c
diff options
context:
space:
mode:
authorkai <kai@zittrig.eu>2020-04-28 18:16:01 +0100
committerkai <kai@zittrig.eu>2020-04-28 18:18:21 +0100
commitb32cd68b200704346ccff4a24e3969cfa697456b (patch)
tree10c1ab47fb8d736b5af5186530569b16dcc34f02 /src/cgame/cg_servercmds.c
parent79c76f434c9a24fa99ca7026ee4529b1e31914b9 (diff)
change how configstrings are handled, and send existing votes to new clients
Diffstat (limited to 'src/cgame/cg_servercmds.c')
-rw-r--r--src/cgame/cg_servercmds.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c
index 7fb3e06..c87e7a7 100644
--- a/src/cgame/cg_servercmds.c
+++ b/src/cgame/cg_servercmds.c
@@ -247,20 +247,30 @@ static void CG_AnnounceHumanStageTransistion( stage_t from, stage_t to )
/*
================
-CG_ConfigStringModified
+CG_ConfigStringModifiedSvcmd
================
*/
-static void CG_ConfigStringModified( void )
+static void CG_ConfigStringModifiedSvcmd( void )
+
{
- const char *str;
int num;
-
num = atoi( CG_Argv( 1 ) );
-
// get the gamestate from the client system, which will have the
// new configstring already integrated
- trap_GetGameState( &cgs.gameState );
+ trap_GetGameState( &cgs.gameState ); // enneract: not needed when calling from CG_Init
+ CG_ConfigStringModified( num );
+}
+
+/*
+================
+CG_ConfigStringModified
+
+================
+*/
+void CG_ConfigStringModified( int num )
+{
+ const char *str;
// look up the individual string that was modified
str = CG_ConfigString( num );
@@ -848,7 +858,7 @@ static void CG_ServerCommand( void )
if( !strcmp( cmd, "cs" ) )
{
- CG_ConfigStringModified( );
+ CG_ConfigStringModifiedSvcmd( );
return;
}