Skip to content

Commit c00e260

Browse files
authored
[Minor] Fix building anims being removed after Chronoshift (#1649)
the issue is introduced by #1588. This might fix it but need testing
1 parent da3f31f commit c00e260

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Ext/Building/Hooks.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,10 @@ DEFINE_HOOK(0x445D87, BuildingClass_Limbo_DestroyableObstacle, 0x6)
422422
if (pTypeExt->IsDestroyableObstacle)
423423
RecalculateCells<true>(pThis);
424424

425+
// only remove animation when the building is destroyed or sold
426+
if (pThis->Health > 0 && pThis->IsAlive && pThis->GetCurrentMission() != Mission::Selling)
427+
return 0;
428+
425429
for (auto& bAnim : pThis->Anims)
426430
{
427431
if (bAnim && VTable::Get(bAnim) == 0x7E3354)

0 commit comments

Comments
 (0)