From ab210d531e93b06fe7db0073596b38929a309b0f Mon Sep 17 00:00:00 2001 From: BotoX Date: Wed, 24 Aug 2016 23:06:51 +0200 Subject: [PATCH] fix engine crash bug in 0c0ce1adfc2bf37517a4819b52c6a14d4b29ee96 --- src/zr/api/infect.api.inc | 4 ++-- src/zr/infect.inc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/zr/api/infect.api.inc b/src/zr/api/infect.api.inc index bd071f8..3b2cb26 100644 --- a/src/zr/api/infect.api.inc +++ b/src/zr/api/infect.api.inc @@ -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); } } diff --git a/src/zr/infect.inc b/src/zr/infect.inc index c6f8dc7..a6fc322 100644 --- a/src/zr/infect.inc +++ b/src/zr/infect.inc @@ -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;