mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-09-02 03:19:10 +00:00
Fix: Prevent duplicate train reversal when already reversing
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user