diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 295d7bc216..da6bd43e05 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -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).