diff --git a/lua/zcnpci.lua b/lua/zcnpci.lua index 5883731..cc251d2 100644 --- a/lua/zcnpci.lua +++ b/lua/zcnpci.lua @@ -212,17 +212,13 @@ hook.Add("HomigradDamage", "zcnpci", function(ent, dmginfo) if dmginfo:IsDamageType(DMG_BULLET + DMG_BUCKSHOT + DMG_BLAST) then if dmginfo:GetDamage() > 3 then table.insert(npcs_to_fake, ent) - - --local attacker_angle = dmginfo:GetAttacker():EyeAngles() - - --local normal = attacker_angle:Forward(normal) - - --ent.npcfakeknockback = normal * 7 * 3 end elseif dmginfo:IsDamageType(DMG_CLUB + DMG_SLASH) then local attacker = dmginfo:GetAttacker() if !IsValid(attacker) then return end + if attacker.HasWeapon == nil then return end + local fists = attacker:HasWeapon("weapon_hands_sh") if !fists then fists = attacker:HasWeapon("weapon_hg_coolhands") end