r5759 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Thu Feb 5 15:28:24 EST 2009
Author: div0
Date: 2009-02-05 15:28:24 -0500 (Thu, 05 Feb 2009)
New Revision: 5759
Modified:
trunk/data/qcsrc/server/clientcommands.qc
Log:
patch #2561469 "Ready restart resets scores incorrectly" fix
Modified: trunk/data/qcsrc/server/clientcommands.qc
===================================================================
--- trunk/data/qcsrc/server/clientcommands.qc 2009-02-05 19:48:45 UTC (rev 5758)
+++ trunk/data/qcsrc/server/clientcommands.qc 2009-02-05 20:28:24 UTC (rev 5759)
@@ -398,8 +398,11 @@
if(g_arena | g_assault | gameover | intermission_running | race_completing)
localcmd("restart\n");
- // reset ALL scores
- Score_ClearAll();
+ // reset ALL scores, but only do that at the beginning
+ //of the countdown if sv_ready_restart_after_countdown is off!
+ //Otherwise scores could be manipulated during the countdown!
+ if (!cvar("sv_ready_restart_after_countdown"))
+ Score_ClearAll();
ReadyRestartForce();
}
@@ -448,9 +451,14 @@
float f, c;
c = game_starttime - time;
f = floor(0.5 + c);
- if(c <= 0) { //show the "Begin" message and
- if(self.spawnflags & 1)
+ if(c <= 0) { //show the "Begin" message
+ if(self.spawnflags & 1) // if sv_ready_restart_after_countdown is set
{
+ if (!g_assault) {
+ //don't clear scores for assault mode, which uses ReadyRestartForce (and thus
+ //restartAnnouncer_Think) to start a new round
+ Score_ClearAll();
+ }
restart_mapalreadyrestarted = 1;
reset_map(TRUE);
}
More information about the nexuiz-commits
mailing list