From b32cd68b200704346ccff4a24e3969cfa697456b Mon Sep 17 00:00:00 2001 From: kai Date: Tue, 28 Apr 2020 18:16:01 +0100 Subject: change how configstrings are handled, and send existing votes to new clients --- src/cgame/cg_servercmds.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'src/cgame/cg_servercmds.c') 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; } -- cgit