[nexuiz-commits] r7236 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sun Jul 19 03:11:10 EDT 2009
Author: div0
Date: 2009-07-19 03:11:09 -0400 (Sun, 19 Jul 2009)
New Revision: 7236
Modified:
trunk/data/qcsrc/server/cl_client.qc
Log:
fix ANYPOINT selection
Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc 2009-07-18 17:54:55 UTC (rev 7235)
+++ trunk/data/qcsrc/server/cl_client.qc 2009-07-19 07:11:09 UTC (rev 7236)
@@ -306,26 +306,33 @@
firstspot = findchain(classname, "info_player_deathmatch");
// filter out the bad ones
// (note this returns the original list if none survived)
- firstspot_new = Spawn_FilterOutBadSpots(firstspot, playerlist, 100, teamcheck);
- if(!firstspot_new)
- firstspot_new = Spawn_FilterOutBadSpots(firstspot, playerlist, -1, teamcheck);
- firstspot = firstspot_new;
-
- // there is 50/50 chance of choosing a random spot or the furthest spot
- // (this means that roughly every other spawn will be furthest, so you
- // usually won't get fragged at spawn twice in a row)
- if (arena_roundbased)
+ if(anypoint)
{
- firstspot_new = Spawn_FilterOutBadSpots(firstspot, playerlist, 800, teamcheck);
- if(firstspot_new)
- firstspot = firstspot_new;
spot = Spawn_WeightedPoint(firstspot, 1, 1, 1);
}
- else if (random() > cvar("g_spawn_furthest"))
- spot = Spawn_WeightedPoint(firstspot, 1, 1, 1);
else
- spot = Spawn_WeightedPoint(firstspot, 1, 5000, 5); // chooses a far far away spawnpoint
+ {
+ firstspot_new = Spawn_FilterOutBadSpots(firstspot, playerlist, 100, teamcheck);
+ if(!firstspot_new)
+ firstspot_new = Spawn_FilterOutBadSpots(firstspot, playerlist, -1, teamcheck);
+ firstspot = firstspot_new;
+ // there is 50/50 chance of choosing a random spot or the furthest spot
+ // (this means that roughly every other spawn will be furthest, so you
+ // usually won't get fragged at spawn twice in a row)
+ if (arena_roundbased)
+ {
+ firstspot_new = Spawn_FilterOutBadSpots(firstspot, playerlist, 800, teamcheck);
+ if(firstspot_new)
+ firstspot = firstspot_new;
+ spot = Spawn_WeightedPoint(firstspot, 1, 1, 1);
+ }
+ else if (random() > cvar("g_spawn_furthest"))
+ spot = Spawn_WeightedPoint(firstspot, 1, 1, 1);
+ else
+ spot = Spawn_WeightedPoint(firstspot, 1, 5000, 5); // chooses a far far away spawnpoint
+ }
+
if(cvar("spawn_debugview"))
{
print("spot mindistance: ", ftos(spot.SPAWNPOINT_SCORE), "\n");
More information about the nexuiz-commits
mailing list