r3286 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Jan 26 10:55:01 EST 2008
Author: div0
Date: 2008-01-26 10:54:59 -0500 (Sat, 26 Jan 2008)
New Revision: 3286
Modified:
trunk/data/qcsrc/server/cl_client.qc
Log:
fix spawn run out bug when players camp on their own spawn points
Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc 2008-01-26 15:34:27 UTC (rev 3285)
+++ trunk/data/qcsrc/server/cl_client.qc 2008-01-26 15:54:59 UTC (rev 3286)
@@ -146,6 +146,7 @@
entity SelectSpawnPoint (float anypoint)
{
local float teamcheck;
+ local entity firstspot_new;
local entity spot, firstspot, playerlist;
spot = find (world, classname, "testplayerstart");
@@ -164,13 +165,17 @@
// filter out the bad ones
// (note this returns the original list if none survived)
firstspot = Spawn_FilterOutBadSpots(firstspot, playerlist, 100, teamcheck);
+ if(!firstspot)
+ firstspot = Spawn_FilterOutBadSpots(firstspot, playerlist, -1, teamcheck);
// 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 = Spawn_FilterOutBadSpots(firstspot, playerlist, 800, teamcheck);
+ firstspot_new = Spawn_FilterOutBadSpots(firstspot, playerlist, 800, teamcheck);
+ if(firstspot_new)
+ firstspot = firstspot_new;
spot = Spawn_RandomPoint(firstspot);
}
else if (random() > 0.5 || spawn_allbad || spawn_allgood)
More information about the nexuiz-commits
mailing list