mirror of
https://github.com/OpenTTD/OpenTTD
synced 2025-12-10 15:02:06 +01:00
Fix 92e895a: don't force proceed crashed trains
This commit is contained in:
committed by
GitHub
parent
4339bf3dc7
commit
bbf582ff3a
@@ -2149,7 +2149,7 @@ CommandCost CmdReverseTrainDirection(DoCommandFlags flags, VehicleID veh_id, boo
|
|||||||
*/
|
*/
|
||||||
static TrainForceProceeding DetermineNextTrainForceProceeding(const Train *t)
|
static TrainForceProceeding DetermineNextTrainForceProceeding(const Train *t)
|
||||||
{
|
{
|
||||||
if (t->force_proceed == TFP_SIGNAL) return TFP_NONE;
|
if (t->vehstatus.Test(VehState::Crashed) || t->force_proceed == TFP_SIGNAL) return TFP_NONE;
|
||||||
if (!t->flags.Test(VehicleRailFlag::Stuck)) return t->IsChainInDepot() ? TFP_STUCK : TFP_SIGNAL;
|
if (!t->flags.Test(VehicleRailFlag::Stuck)) return t->IsChainInDepot() ? TFP_STUCK : TFP_SIGNAL;
|
||||||
|
|
||||||
TileIndex next_tile = TileAddByDiagDir(t->tile, TrackdirToExitdir(t->GetVehicleTrackdir()));
|
TileIndex next_tile = TileAddByDiagDir(t->tile, TrackdirToExitdir(t->GetVehicleTrackdir()));
|
||||||
|
|||||||
Reference in New Issue
Block a user