Slug Rifle headshot damage now displays 9999.
Slug Rifle headshots now display 9999 as their damage value (this is only display damage, the actual damage isn't even relevant). Slug Rifle passive no longer works on bosses.
This commit is contained in:
parent
1d517c5375
commit
45b5b7e952
2 changed files with 12 additions and 1 deletions
|
@ -120,6 +120,11 @@ function SWEP.BulletCallback(attacker, tr, dmginfo)
|
|||
if tr.HitGroup == HITGROUP_HEAD then
|
||||
local ent = tr.Entity
|
||||
if ent:IsValid() and ent:IsPlayer() then
|
||||
if ent:Team() == TEAM_UNDEAD and ent:GetZombieClassTable().Boss then
|
||||
GenericBulletCallback(attacker, tr, dmginfo)
|
||||
return
|
||||
end
|
||||
|
||||
ent.Gibbed = CurTime()
|
||||
end
|
||||
|
||||
|
@ -128,5 +133,6 @@ function SWEP.BulletCallback(attacker, tr, dmginfo)
|
|||
end
|
||||
end
|
||||
|
||||
INFDAMAGEFLOATER = true
|
||||
GenericBulletCallback(attacker, tr, dmginfo)
|
||||
end
|
||||
|
|
|
@ -2462,7 +2462,12 @@ function GM:DamageFloater(attacker, victim, dmginfo)
|
|||
if dmgpos == vector_origin then dmgpos = victim:NearestPoint(attacker:EyePos()) end
|
||||
|
||||
net.Start(victim:IsPlayer() and "zs_dmg" or "zs_dmg_prop")
|
||||
if INFDAMAGEFLOATER then
|
||||
INFDAMAGEFLOATER = nil
|
||||
net.WriteUInt(9999, 16)
|
||||
else
|
||||
net.WriteUInt(math.ceil(dmginfo:GetDamage()), 16)
|
||||
end
|
||||
net.WriteVector(dmgpos)
|
||||
net.Send(attacker)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue