From a04058b8e52ac71fec0cc975eec499dd15b3cb6c Mon Sep 17 00:00:00 2001 From: Strogoo Date: Wed, 13 Jun 2018 17:38:44 +0300 Subject: [PATCH] nuke missile invulnerable to satellite laser --- lua/sim/DefaultProjectiles.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lua/sim/DefaultProjectiles.lua b/lua/sim/DefaultProjectiles.lua index bd2069e840..60095b1043 100644 --- a/lua/sim/DefaultProjectiles.lua +++ b/lua/sim/DefaultProjectiles.lua @@ -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, } -----------------------------------------------------------------