]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't count dead players when selecting a spawnpoint
authorterencehill <piuntn@gmail.com>
Tue, 2 Jun 2020 15:24:28 +0000 (17:24 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 2 Jun 2020 15:24:28 +0000 (17:24 +0200)
qcsrc/server/spawnpoints.qc

index 9c89ae6f61cd58af1443e4f5867c7bb3c27589eb..0e270d30d1ab7b1b078544b1a24533aab8bab41d 100644 (file)
@@ -232,7 +232,7 @@ vector Spawn_Score(entity this, entity spot, float mindist, float teamcheck, boo
 
        float prio = 0;
        float shortest = vlen(world.maxs - world.mins);
-       FOREACH_CLIENT(IS_PLAYER(it) && it != this, {
+       FOREACH_CLIENT(IS_PLAYER(it) && !IS_DEAD(it) && it != this, {
                float thisdist = vlen(it.origin - spot.origin);
                if (thisdist < shortest)
                        shortest = thisdist;