From 0c6b863c00b5df82bf2804f583d8966cac6d5a19 Mon Sep 17 00:00:00 2001 From: zaCade Date: Sat, 8 Sep 2018 16:03:32 +0200 Subject: [PATCH] General: Doh, 'player_spawn' fires for spectators. Who knew? I totally didn't. --- src/zr/zspawn.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/zr/zspawn.inc b/src/zr/zspawn.inc index a38b67b..23cb9ba 100644 --- a/src/zr/zspawn.inc +++ b/src/zr/zspawn.inc @@ -123,7 +123,8 @@ ZSpawnOnClientDeath(client) */ ZSpawnOnClientSpawn(client) { - if (InfectHasZombieSpawned()) + // Check if client is spawning on a team. + if (ZRIsClientOnTeam(client) && InfectHasZombieSpawned()) { // Get our zspawn condition. new ZSpawnCondition:condition = GetZSpawnCondition(); @@ -132,7 +133,7 @@ ZSpawnOnClientSpawn(client) { case ZSpawn_Zombie: { - // Our client should be infected. + // Infect client. InfectHumanToZombie(client); } }