Fix: Train reversing when partially in a depot (#15662)

This commit is contained in:
Jonathan G Rennison
2026-06-03 23:48:43 +01:00
committed by GitHub
parent 4175aee782
commit 2ef1623c05
+4 -1
View File
@@ -1653,7 +1653,10 @@ static void UpdateStatusAfterSwap(Train *v, bool reverse = true)
/* Call the proper EnterTile function unless we are in a wormhole. */
if (v->track != TRACK_BIT_WORMHOLE) {
VehicleEnterTile(v, v->tile, v->x_pos, v->y_pos);
/* Do not call EnterTile for vehicles partially or totally in a depot. */
if (!IsRailDepotTile(v->tile)) {
VehicleEnterTile(v, v->tile, v->x_pos, v->y_pos);
}
} else {
/* VehicleEnterTile_TunnelBridge() sets TRACK_BIT_WORMHOLE when the vehicle
* is on the last bit of the bridge head (frame == TILE_SIZE - 1).