General: Doh, 'player_spawn' fires for spectators.

Who knew? I totally didn't.
This commit is contained in:
zaCade 2018-09-08 16:03:32 +02:00
parent 811c5ccb72
commit 0c6b863c00

View File

@ -123,7 +123,8 @@ ZSpawnOnClientDeath(client)
*/ */
ZSpawnOnClientSpawn(client) ZSpawnOnClientSpawn(client)
{ {
if (InfectHasZombieSpawned()) // Check if client is spawning on a team.
if (ZRIsClientOnTeam(client) && InfectHasZombieSpawned())
{ {
// Get our zspawn condition. // Get our zspawn condition.
new ZSpawnCondition:condition = GetZSpawnCondition(); new ZSpawnCondition:condition = GetZSpawnCondition();
@ -132,7 +133,7 @@ ZSpawnOnClientSpawn(client)
{ {
case ZSpawn_Zombie: case ZSpawn_Zombie:
{ {
// Our client should be infected. // Infect client.
InfectHumanToZombie(client); InfectHumanToZombie(client);
} }
} }