From 03d226ad594437df2b060d515b5d0095da2af114 Mon Sep 17 00:00:00 2001 From: Greyscale Date: Thu, 2 Jul 2009 01:19:54 -0700 Subject: [PATCH] Fixed knife being all screwed up on zombies. --- src/zr/infect.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/zr/infect.inc b/src/zr/infect.inc index c91a872..c1a2557 100644 --- a/src/zr/infect.inc +++ b/src/zr/infect.inc @@ -578,6 +578,9 @@ InfectHumanToZombie(client, attacker = -1, bool:motherinfect = false, bool:respa // If this is the knife slot, then stop. if (WeaponsSlot:x == Slot_Melee) { + // Strip knife. + RemovePlayerItem(client, weapons[x]); + continue; } @@ -591,11 +594,8 @@ InfectHumanToZombie(client, attacker = -1, bool:motherinfect = false, bool:respa } } - // If client has no knife, give them one. - if (GetPlayerWeaponSlot(client, _:Slot_Melee) == -1) - { - GivePlayerItem(client, "weapon_knife"); - } + // Give zombie a new knife. (If you leave the old one there will be glitches with the knife positioning) + GivePlayerItem(client, "weapon_knife"); // Check if consecutive infection protection is enabled. new bool:infectconsecutiveblock = GetConVarBool(g_hCvarsList[CVAR_INFECT_CONSECUTIVE_BLOCK]);