mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-21 01:59:44 +00:00
Fix: Train reversing when partially in a depot (#15662)
This commit is contained in:
committed by
GitHub
parent
4175aee782
commit
2ef1623c05
+4
-1
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user