Skip to content

Commit

Permalink
nuke missile invulnerable to satellite laser
Browse files Browse the repository at this point in the history
  • Loading branch information
Strogoo authored and aeoncleanse committed Jul 12, 2018
1 parent 3c59aaa commit a04058b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lua/sim/DefaultProjectiles.lua
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,17 @@ NukeProjectile = Class(NullShell) {
end
NullShell.DoTakeDamage(self, instigator, amount, vector, damageType)
end,

OnDamage = function(self, instigator, amount, vector, damageType)
if not instigator:GetBlueprint().CategoriesHash.SATELLITE then
local bp = self:GetBlueprint().Defense.MaxHealth
if bp then
self:DoTakeDamage(instigator, amount, vector, damageType)
else
self:OnKilled(instigator, damageType)
end
end
end,
}

-----------------------------------------------------------------
Expand Down

0 comments on commit a04058b

Please sign in to comment.