1
0
Fork 0

Fix #10490: Allow ships to exit depots if another is not moving at the exit point

pull/12161/head
SamuXarick 2024-02-22 21:42:22 +00:00
parent 2b79e7cdf5
commit a9215daed7
1 changed files with 2 additions and 2 deletions

View File

@ -364,11 +364,11 @@ void Ship::UpdateDeltaXY()
} }
/** /**
* Test-procedure for HasVehicleOnPos to check for any ships which are visible and not stopped by the player. * Test-procedure for HasVehicleOnPos to check for any ships which are moving.
*/ */
static Vehicle *EnsureNoMovingShipProc(Vehicle *v, void *) static Vehicle *EnsureNoMovingShipProc(Vehicle *v, void *)
{ {
return v->type == VEH_SHIP && (v->vehstatus & (VS_HIDDEN | VS_STOPPED)) == 0 ? v : nullptr; return v->type == VEH_SHIP && v->cur_speed != 0 ? v : nullptr;
} }
static bool CheckReverseShip(const Ship *v, Trackdir *trackdir = nullptr) static bool CheckReverseShip(const Ship *v, Trackdir *trackdir = nullptr)