From 90503a23c648e5e40c31f793fb83fd5e37e9b717 Mon Sep 17 00:00:00 2001 From: maudlin27 <95254039+maudlin27@users.noreply.github.com> Date: Wed, 20 Nov 2024 07:33:20 +0000 Subject: [PATCH] Update DefaultProjectileWeapon.lua Switched to different is destroyed check did basis test with T3 arti in sandbox and seemed to work (but the replay didn't have an error arising in the first place more a test that it's not broken something) --- lua/sim/weapons/DefaultProjectileWeapon.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/sim/weapons/DefaultProjectileWeapon.lua b/lua/sim/weapons/DefaultProjectileWeapon.lua index 9ba77bdc7f..b916b1df04 100644 --- a/lua/sim/weapons/DefaultProjectileWeapon.lua +++ b/lua/sim/weapons/DefaultProjectileWeapon.lua @@ -411,7 +411,7 @@ DefaultProjectileWeapon = ClassWeapon(Weapon) { ---@param self DefaultProjectileWeapon EconomyDrainThread = function(self) WaitFor(self.EconDrain) - if self.unit.BeenDestroyed and not(self.unit:BeenDestroyed()) then + if self.unit and not(IsDestroyed(self.unit)) then RemoveEconomyEvent(self.unit, self.EconDrain) end self.EconDrain = nil