From 82b3f7dd05c0b0e51e1dc68f6abc6ebaa8d8320f Mon Sep 17 00:00:00 2001 From: Greyscale Date: Mon, 6 Jul 2009 14:42:25 -0700 Subject: [PATCH] Moved some code around to organize better. --- src/zr/infect.inc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/zr/infect.inc b/src/zr/infect.inc index faf9e27..26c2a60 100644 --- a/src/zr/infect.inc +++ b/src/zr/infect.inc @@ -556,16 +556,6 @@ InfectHumanToZombie(client, attacker = -1, bool:motherinfect = false, bool:respa // Mark player as zombie. bZombie[client] = true; - // Get a list of all client's weapon indexes. - new weapons[WeaponsSlot]; - WeaponsGetClientWeapons(client, weapons); - - // Check if weapons drop is enabled. - new bool:weaponsdrop = GetConVarBool(g_hCvarsList[CVAR_INFECT_WEAPONS_DROP]); - - // 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]); @@ -643,6 +633,13 @@ InfectHumanToZombie(client, attacker = -1, bool:motherinfect = false, bool:respa ZTeleOnClientInfected(client); ZHPOnClientInfected(client); + // Get a list of all client's weapon indexes. + new weapons[WeaponsSlot]; + WeaponsGetClientWeapons(client, weapons); + + // Check if weapons drop is enabled. + new bool:weaponsdrop = GetConVarBool(g_hCvarsList[CVAR_INFECT_WEAPONS_DROP]); + // This must be after the event forwarding because it fixes a problem caused by changing models in ClassOnClientInfected. // Loop through array slots and force drop. // x = weapon slot. @@ -674,6 +671,9 @@ InfectHumanToZombie(client, attacker = -1, bool:motherinfect = false, bool:respa RemovePlayerItem(client, weapons[x]); } } + + // Give zombie a new knife. (If you leave the old one there will be glitches with the knife positioning) + GivePlayerItem(client, "weapon_knife"); } /**