diff --git a/scripts/vscripts/ZombieReborn/Infect.lua b/scripts/vscripts/ZombieReborn/Infect.lua index bcf897a..f111698 100644 --- a/scripts/vscripts/ZombieReborn/Infect.lua +++ b/scripts/vscripts/ZombieReborn/Infect.lua @@ -33,14 +33,14 @@ function Infect(hInflictor, hInfected, bKeepPosition, bDead) -- Asynchronously kill any utils held by the infected player AND any nades threwn by said player local tHeldWeapons = hInfected:GetEquippedWeapons() - for _,hWeapon in ipairs(tHeldWeapons) do + for _, hWeapon in ipairs(tHeldWeapons) do if hWeapon and hWeapon:GetClassname() ~= "weapon_knife" then DoEntFireByInstanceHandle(hWeapon, "Kill", "", 0.02, nil, nil) end end local tThrewnNades = Entities:FindAllByClassname("hegrenade_projectile") - for __,hProjectile in ipairs(tThrewnNades) do + for __, hProjectile in ipairs(tThrewnNades) do if hProjectile and hProjectile:GetOwner() == hInfected then DoEntFireByInstanceHandle(hProjectile, "Kill", "", 0.02, nil, nil) end @@ -76,14 +76,14 @@ function InfectMotherZombie(hInfected, bKeepPosition) -- Asynchronously kill any utils held by the infected player AND any nades threwn by said player local tHeldWeapons = hInfected:GetEquippedWeapons() - for _,hWeapon in ipairs(tHeldWeapons) do + for _, hWeapon in ipairs(tHeldWeapons) do if hWeapon and hWeapon:GetClassname() ~= "weapon_knife" then DoEntFireByInstanceHandle(hWeapon, "Kill", "", 0.02, nil, nil) end end local tThrewnNades = Entities:FindAllByClassname("hegrenade_projectile") - for __,hProjectile in ipairs(tThrewnNades) do + for __, hProjectile in ipairs(tThrewnNades) do if hProjectile and hProjectile:GetOwner() == hInfected then DoEntFireByInstanceHandle(hProjectile, "Kill", "", 0.02, nil, nil) end