r1986 - branches/nexuiz-2.0/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sun Dec 3 10:52:39 EST 2006
Author: div0
Date: 2006-12-03 10:52:38 -0500 (Sun, 03 Dec 2006)
New Revision: 1986
Modified:
branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
Log:
green's simplification
Modified: branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_world.qc 2006-12-03 14:59:31 UTC (rev 1985)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_world.qc 2006-12-03 15:52:38 UTC (rev 1986)
@@ -527,9 +527,8 @@
string newlist;
// now reinsert this at another position
- insertpos = pow(Map_Count - 1, exponent);
- insertpos = random() * insertpos; // ]0, (Map_Count - 1)^exponent]
- insertpos = pow(insertpos, 1 / exponent); // ]0, Map_Count - 1]
+ insertpos = pow(random(), 1 / exponent); // ]0, 1]
+ insertpos = insertpos * (Map_Count - 1); // ]0, Map_Count - 1]
insertpos = ceil(insertpos) + 1; // {2, 3, 4, ..., Map_Count}
dprint("SHUFFLE: insert pos = ", ftos(insertpos), "\n");
More information about the nexuiz-commits
mailing list