Fix harvs dragging to refinery even if it died while turning
This commit is contained in:
@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
{
|
{
|
||||||
public abstract class HarvesterDockSequence : Activity
|
public abstract class HarvesterDockSequence : Activity
|
||||||
{
|
{
|
||||||
protected enum DockingState { Wait, Turn, Dock, Loop, Undock, Complete }
|
protected enum DockingState { Wait, Turn, Drag, Dock, Loop, Undock, Complete }
|
||||||
|
|
||||||
protected readonly Actor Refinery;
|
protected readonly Actor Refinery;
|
||||||
protected readonly Harvester Harv;
|
protected readonly Harvester Harv;
|
||||||
@@ -54,10 +54,18 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
case DockingState.Turn:
|
case DockingState.Turn:
|
||||||
dockingState = DockingState.Dock;
|
dockingState = DockingState.Drag;
|
||||||
QueueChild(new Turn(self, DockAngle));
|
QueueChild(new Turn(self, DockAngle));
|
||||||
|
return false;
|
||||||
|
|
||||||
|
case DockingState.Drag:
|
||||||
|
if (!Refinery.IsInWorld || Refinery.IsDead)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
dockingState = DockingState.Dock;
|
||||||
if (IsDragRequired)
|
if (IsDragRequired)
|
||||||
QueueChild(new Drag(self, StartDrag, EndDrag, DragLength));
|
QueueChild(new Drag(self, StartDrag, EndDrag, DragLength));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
case DockingState.Dock:
|
case DockingState.Dock:
|
||||||
|
|||||||
Reference in New Issue
Block a user