mirror of
https://github.com/wiremod/wire.git
synced 2025-03-04 03:03:04 -05:00
Fix bootleg detonator damaging method (#2371)
* fix bootleg detonator damage method * DMG_GENERIC for detonator * shorter damage call
This commit is contained in:
parent
5afa710720
commit
1c46f36afe
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user