diff options
Diffstat (limited to 'src/cgame/cg_servercmds.c')
-rw-r--r-- | src/cgame/cg_servercmds.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c index 65e09cd5..4236cafd 100644 --- a/src/cgame/cg_servercmds.c +++ b/src/cgame/cg_servercmds.c @@ -189,11 +189,12 @@ void CG_SetConfigValues( void ) { cgs.scores1 = atoi( CG_ConfigString( CS_SCORES1 ) ); cgs.scores2 = atoi( CG_ConfigString( CS_SCORES2 ) ); - cgs.dBuildPoints = atoi( CG_ConfigString( CS_DBPOINTS ) ); - cgs.dBuildPointsTotal = atoi( CG_ConfigString( CS_DTBPOINTS ) ); - cgs.hBuildPoints = atoi( CG_ConfigString( CS_HBPOINTS ) ); - cgs.hBuildPointsTotal = atoi( CG_ConfigString( CS_HTBPOINTS ) ); - cgs.hBuildPointsPowered = atoi( CG_ConfigString( CS_HPBPOINTS ) ); + sscanf( CG_ConfigString( CS_BUILDPOINTS ), + "%d %d %d %d %d", &cgs.dBuildPoints, + &cgs.dBuildPointsTotal, + &cgs.hBuildPoints, + &cgs.hBuildPointsTotal, + &cgs.hBuildPointsPowered ); cgs.levelStartTime = atoi( CG_ConfigString( CS_LEVEL_START_TIME ) ); if( cgs.gametype == GT_CTF ) { @@ -276,16 +277,12 @@ static void CG_ConfigStringModified( void ) { cgs.scores1 = atoi( str ); } else if ( num == CS_SCORES2 ) { cgs.scores2 = atoi( str ); - } else if ( num == CS_DBPOINTS ) { - cgs.dBuildPoints = atoi( str ); - } else if ( num == CS_DTBPOINTS ) { - cgs.dBuildPointsTotal = atoi( str ); - } else if ( num == CS_HBPOINTS ) { - cgs.hBuildPoints = atoi( str ); - } else if ( num == CS_HTBPOINTS ) { - cgs.hBuildPointsTotal = atoi( str ); - } else if ( num == CS_HPBPOINTS ) { - cgs.hBuildPointsPowered = atoi( str ); + } else if( num == CS_BUILDPOINTS ) { + sscanf( str, "%d %d %d %d %d", &cgs.dBuildPoints, + &cgs.dBuildPointsTotal, + &cgs.hBuildPoints, + &cgs.hBuildPointsTotal, + &cgs.hBuildPointsPowered ); } else if ( num == CS_LEVEL_START_TIME ) { cgs.levelStartTime = atoi( str ); } else if ( num == CS_VOTE_TIME ) { |