r2572 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed May 16 17:00:34 EDT 2007
Author: div0
Date: 2007-05-16 17:00:34 -0400 (Wed, 16 May 2007)
New Revision: 2572
Modified:
trunk/data/qcsrc/server/g_world.qc
Log:
fix unused stats feature
Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc 2007-05-16 05:31:04 UTC (rev 2571)
+++ trunk/data/qcsrc/server/g_world.qc 2007-05-16 21:00:34 UTC (rev 2572)
@@ -945,27 +945,29 @@
GameLogClose();
- maxTotalFrags = 0;
FOR_EACH_CLIENT(other)
{
+ FixIntermissionClient(other);
+
+ if(other.winning)
+ bprint(other.netname, " ^7wins.\n");
+ }
+
+ minTotalFrags = 0;
+ maxTotalFrags = 0;
+ FOR_EACH_PLAYER(other)
+ {
if(maxTotalFrags < other.totalfrags)
maxTotalFrags = other.totalfrags;
if(minTotalFrags > other.totalfrags)
minTotalFrags = other.totalfrags;
}
- FOR_EACH_CLIENT(other)
+ if(!currentbots)
{
- FixIntermissionClient(other);
-
- self = other;
-
- if(other.winning)
- bprint(other.netname, " ^7wins.\n");
-
- if(!currentbots)
+ FOR_EACH_PLAYER(other)
{
- score = (other.frags - minTotalFrags) / max(maxTotalFrags - minTotalFrags, 1);
+ score = (other.totalfrags - minTotalFrags) / max(maxTotalFrags - minTotalFrags, 1);
f = bound(0, other.play_time / max(time, 1), 1);
// store some statistics?
}
More information about the nexuiz-commits
mailing list