r5076 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Nov 22 03:43:09 EST 2008
Author: div0
Date: 2008-11-22 03:43:08 -0500 (Sat, 22 Nov 2008)
New Revision: 5076
Modified:
trunk/data/qcsrc/server/g_world.qc
Log:
race-qualifying -> race better
Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc 2008-11-22 08:26:41 UTC (rev 5075)
+++ trunk/data/qcsrc/server/g_world.qc 2008-11-22 08:43:08 UTC (rev 5076)
@@ -1476,31 +1476,7 @@
// NEVER initiate overtime
if(wc == WINNING_YES || wc == WINNING_STARTOVERTIME)
- // do NOT support equality when the laps are all raced!
{
- float totalplayers;
- float playerswithlaps;
- float readyplayers;
- entity head;
- totalplayers = playerswithlaps = readyplayers = 0;
- FOR_EACH_PLAYER(head)
- {
- ++totalplayers;
- if(PlayerScore_Add(head, SP_RACE_FASTEST, 0))
- ++playerswithlaps;
- if(head.ready)
- ++readyplayers;
- }
-
- // at least 2/3 of the players have completed a lap: start the RACE
- // otherwise, the players should end the qualifying on their own
- if(readyplayers || ((totalplayers >= 3) && (playerswithlaps * 3 >= totalplayers * 2)))
- {
- checkrules_overtimeend = 0;
- ReadyRestart();
- return WINNING_NEVER;
- }
-
return WINNING_YES;
}
@@ -1639,7 +1615,34 @@
else
{
if (timelimit && time >= timelimit)
- InitiateOvertime();
+ {
+ if(g_race && g_race_qualifying == 2)
+ {
+ float totalplayers;
+ float playerswithlaps;
+ float readyplayers;
+ entity head;
+ totalplayers = playerswithlaps = readyplayers = 0;
+ FOR_EACH_PLAYER(head)
+ {
+ ++totalplayers;
+ if(PlayerScore_Add(head, SP_RACE_FASTEST, 0))
+ ++playerswithlaps;
+ if(head.ready)
+ ++readyplayers;
+ }
+
+ // at least 2/3 of the players have completed a lap: start the RACE
+ // otherwise, the players should end the qualifying on their own
+ if(readyplayers || ((totalplayers >= 3) && (playerswithlaps * 3 >= totalplayers * 2)))
+ {
+ checkrules_overtimeend = 0;
+ ReadyRestart(); // go to race
+ }
+ }
+ else
+ InitiateOvertime();
+ }
}
if (checkrules_overtimeend && time >= checkrules_overtimeend)
More information about the nexuiz-commits
mailing list