fix engine crash bug in 0c0ce1adfc

This commit is contained in:
BotoX 2016-08-24 23:06:51 +02:00
parent 21c2ac40a8
commit ab210d531e
2 changed files with 3 additions and 3 deletions

View File

@ -188,9 +188,9 @@ APIOnClientInfected(client, attacker, bool:motherinfect, bool:respawnoverride, b
static char sTargetname[64];
GetEntPropString(entity, Prop_Data, "m_iName", sTargetname, sizeof(sTargetname));
if(StrEqual(sTargetname, "game_playerdie"))
if(client > 0 && StrEqual(sTargetname, "game_playerdie"))
AcceptEntityInput(entity, "Use", client, client);
else if(StrEqual(sTargetname, "game_playerkill"))
else if(attacker > 0 && StrEqual(sTargetname, "game_playerkill"))
AcceptEntityInput(entity, "Use", attacker, attacker);
}
}

View File

@ -437,7 +437,7 @@ InfectOnRoundEnd()
ZREndTimer(tInfectCountdown);
// x = client index.
for (new x = 1; x <= MaxClients; x++)
for (new x = 1; x <= MaxClients; x++)
{
// Disable zombie flag on client.
bZombie[x] = false;