Fix bootleg detonator damaging method (#2371)

* fix bootleg detonator damage method

* DMG_GENERIC for detonator

* shorter damage call
This commit is contained in:
andreweathan 2022-08-15 17:48:03 +03:00 committed by GitHub
parent 5afa710720
commit 1c46f36afe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,14 +37,8 @@ function ENT:ShowOutput( Trigger )
end
function ENT:DoDamage()
if self.target and self.target:IsValid() and self.target:Health() > 0 then
if self.target:Health() <= self.damage then
self.target:SetHealth(0)
self.target:Fire( "break", "", 0 )
self.target:Fire( "kill", "", 0.2 )
else
self.target:SetHealth( self.target:Health() - self.damage )
end
if self.target and self.target:IsValid() then
self.target:TakeDamage(self.damage, self:GetPlayer(), self)
end
local effectdata = EffectData()