Fix TS harvesters getting stuck in unload graphics

when refinery is destroyed while unloading.
This commit is contained in:
reaperrr
2020-10-18 22:53:29 +02:00
committed by abcdefg30
parent 90d9ee1f5c
commit 6bba35c330

View File

@@ -48,7 +48,7 @@ namespace OpenRA.Mods.Cnc.Activities
// If body.Docked wasn't set, we didn't actually dock and have to skip the undock overlay
if (!body.Docked)
dockingState = DockingState.Complete;
else if (spriteOverlay != null && !spriteOverlay.Visible)
else if (Refinery.IsInWorld && !Refinery.IsDead && spriteOverlay != null && !spriteOverlay.Visible)
{
dockingState = DockingState.Wait;
spriteOverlay.Visible = true;