From 884c2b001afca711d1ea59fe35c2305f99b5c735 Mon Sep 17 00:00:00 2001 From: Richard Helgeby Date: Sun, 14 Apr 2013 02:36:10 +0200 Subject: [PATCH] Fixed attacker not getting credit for delayed infection. --- src/zr/immunityhandler.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/zr/immunityhandler.inc b/src/zr/immunityhandler.inc index 14c8da8..b862fdf 100644 --- a/src/zr/immunityhandler.inc +++ b/src/zr/immunityhandler.inc @@ -449,12 +449,15 @@ public Action:ImmunityDelayTimerHandler(Handle:timer, any:client) // Check if time is up. if (PlayerImmunityDuration[client] <= 0) { + // Get attacker before cleaning up. + new attacker = PlayerImmunityAttacker[client]; + // Time is up. Reset data. PlayerImmunityDuration[client] = 0; ImmunityAbortHandler(client); - // Infect client. - InfectHumanToZombie(client, PlayerImmunityAttacker[client]); + // Infect client. Give credit to the stored attacker. + InfectHumanToZombie(client, attacker); return Plugin_Stop; }