Skip to content

Commit

Permalink
Update DefaultProjectileWeapon.lua
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
maudlin27 authored Nov 20, 2024
1 parent 9cce88f commit 90503a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/sim/weapons/DefaultProjectileWeapon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 90503a2

Please sign in to comment.