mirror of https://github.com/OpenTTD/OpenTTD
Fix: Prevent duplicate train reversal when already reversing
parent
2cd3c8db86
commit
e46456d605
|
@ -1973,6 +1973,8 @@ static bool IsWholeTrainInsideDepot(const Train *v)
|
|||
*/
|
||||
void ReverseTrainDirection(Train *v)
|
||||
{
|
||||
DEBUG(driver, 1, "Reversing train %d on tile %d", v->index, v->tile);
|
||||
|
||||
if (IsRailDepotTile(v->tile)) {
|
||||
if (IsWholeTrainInsideDepot(v)) return;
|
||||
InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile);
|
||||
|
|
Loading…
Reference in New Issue