r2038 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue Dec 12 01:25:20 EST 2006
Author: div0
Date: 2006-12-12 01:25:20 -0500 (Tue, 12 Dec 2006)
New Revision: 2038
Modified:
trunk/data/qcsrc/server/g_world.qc
Log:
try to find that LMS bug using developer 1
Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc 2006-12-12 06:24:49 UTC (rev 2037)
+++ trunk/data/qcsrc/server/g_world.qc 2006-12-12 06:25:20 UTC (rev 2038)
@@ -1014,9 +1014,42 @@
{
entity head;
- if(lms_dead_count < 0)
- lms_dead_count = 0;
+ if(cvar("developer"))
+ {
+ float real_dead_count;
+ float real_player_count;
+ for(head = world; (head = find(head, classname, "player")); )
+ {
+ if(head.frags < 1)
+ real_dead_count += 1;
+ real_player_count += 1;
+ }
+ for(head = world; (head = find(head, classname, "observer")); )
+ {
+ if(head.frags < 1)
+ real_dead_count += 1;
+ real_player_count += 1;
+ }
+ for(head = world; (head = find(head, classname, "spectator")); )
+ {
+ if(head.frags < 1)
+ real_dead_count += 1;
+ real_player_count += 1;
+ }
+ if(player_count != real_player_count)
+ {
+ dprint("ERROR: ", ftos(player_count), " is not ");
+ dprint(ftos(real_player_count), " -> player count mismatch\n");
+ }
+
+ if(lms_dead_count != real_dead_count)
+ {
+ dprint("ERROR: ", ftos(lms_dead_count), " is not ");
+ dprint(ftos(real_dead_count), " -> dead count mismatch\n");
+ }
+ }
+
if(player_count > 1 && lms_dead_count >= player_count - 1)
return WINNING_YES; // He's the last man standing!
More information about the nexuiz-commits
mailing list