Fix miner undock state transition
This commit is contained in:
@@ -960,10 +960,15 @@ public sealed class SimulationEngine
|
||||
}
|
||||
|
||||
station?.DockedShipIds.Remove(ship.Id);
|
||||
ship.DockedStationId = null;
|
||||
ship.State = "undocking";
|
||||
ship.Position = ship.Position.MoveToward(task.TargetPosition.Value, ship.Definition.Speed * deltaSeconds);
|
||||
return ship.Position.DistanceTo(task.TargetPosition.Value) <= task.Threshold ? "undocked" : "none";
|
||||
if (ship.Position.DistanceTo(task.TargetPosition.Value) > task.Threshold)
|
||||
{
|
||||
return "none";
|
||||
}
|
||||
|
||||
ship.DockedStationId = null;
|
||||
return "undocked";
|
||||
}
|
||||
|
||||
private void AdvanceControlState(ShipRuntime ship, string controllerEvent)
|
||||
|
||||
Reference in New Issue
Block a user