From 8955232199bd78864619c0f0c3990f8169a335f9 Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Fri, 17 Jan 2025 20:41:29 -0800 Subject: [PATCH 1/3] Check if instigator is destroyed in fatboy deaththread --- units/UEL0401/UEL0401_script.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/units/UEL0401/UEL0401_script.lua b/units/UEL0401/UEL0401_script.lua index 58156e03b9..8d6d4a5c7a 100644 --- a/units/UEL0401/UEL0401_script.lua +++ b/units/UEL0401/UEL0401_script.lua @@ -17,6 +17,8 @@ local EffectUtil = import("/lua/effectutilities.lua") local ExternalFactoryComponent = import("/lua/defaultcomponents.lua").ExternalFactoryComponent local DefaultExplosions = import("/lua/defaultexplosions.lua") +local IsDestroyed = IsDestroyed + ---@class UEL0401 : TMobileFactoryUnit, ExternalFactoryComponent ---@field UnitBeingBuilt Unit | nil ---@field AttachmentSliderManip moho.SlideManipulator @@ -258,7 +260,7 @@ UEL0401 = ClassUnit(TMobileFactoryUnit, ExternalFactoryComponent) { local explosionBones = {} local explosionBoneCount = table.getn(self.ExplosionBones) - if instigator then + if not IsDestroyed(instigator) then -- if there is an instigator, favor exploding bits that are near the instigator local ix, iy, iz = instigator:GetPositionXYZ() for k, bone in self.ExplosionBones do From fd1ad3fb5100d04c6ef0ac9700e5ff466f0fe2ea Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Fri, 17 Jan 2025 21:11:36 -0800 Subject: [PATCH 2/3] Update UEL0401_script.lua --- units/UEL0401/UEL0401_script.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/units/UEL0401/UEL0401_script.lua b/units/UEL0401/UEL0401_script.lua index 8d6d4a5c7a..f1e756a1bc 100644 --- a/units/UEL0401/UEL0401_script.lua +++ b/units/UEL0401/UEL0401_script.lua @@ -260,6 +260,7 @@ UEL0401 = ClassUnit(TMobileFactoryUnit, ExternalFactoryComponent) { local explosionBones = {} local explosionBoneCount = table.getn(self.ExplosionBones) + -- Since this is a thread, it is delayed by 1 tick so the instigator may be destroyed if not IsDestroyed(instigator) then -- if there is an instigator, favor exploding bits that are near the instigator local ix, iy, iz = instigator:GetPositionXYZ() From 7385a2edb7309110c3429be3e310e5cd4d6036c4 Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Fri, 17 Jan 2025 21:14:46 -0800 Subject: [PATCH 3/3] Create fix.6629.md --- changelog/snippets/fix.6629.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/snippets/fix.6629.md diff --git a/changelog/snippets/fix.6629.md b/changelog/snippets/fix.6629.md new file mode 100644 index 0000000000..8e9b929f38 --- /dev/null +++ b/changelog/snippets/fix.6629.md @@ -0,0 +1 @@ +- (#6629) Fix a rare error that would cause the Fatboy to not finish dying.