# HG changeset patch # User SamuXarick <43006711+SamuXarick@users.noreply.github.com> # Date 2024-02-23 13:08:16 # Node ID da52f73e975a9f48f3d232ab02caf82805235d7b # Parent 93db387017f6216ebac1e7b20a568565d0aaff62 Fix #10490: Allow ships to exit depots if another is not moving at the exit point (#12161) diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -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 *) { - 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)