From 741257506a81580fd84a06324a42589372857b1f Mon Sep 17 00:00:00 2001 From: Andrii Dokhniak Date: Sat, 8 Jun 2024 16:23:31 +0200 Subject: [PATCH] Fixed the train depo issue --- src/rail_map.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/rail_map.h b/src/rail_map.h index f31bb0b5ce..3ca6ac1234 100644 --- a/src/rail_map.h +++ b/src/rail_map.h @@ -552,9 +552,7 @@ inline void SetRailDepotExitDirection(Tile tile, DiagDirection dir) */ inline void MakeRailDepot(Tile tile, Owner owner, DepotID depot_id, DiagDirection dir, RailType rail_type) { - SetTileType(tile, MP_RAILWAY); - SetTileOwner(tile, owner); - SetDockingTile(tile, false); + tile.m1() = 0; tile.m2() = depot_id; tile.m3() = 0; tile.m4() = 0; @@ -563,6 +561,9 @@ inline void MakeRailDepot(Tile tile, Owner owner, DepotID depot_id, DiagDirectio tile.m7() = 0; tile.m8() = rail_type; tile.m9() = 0; + SetTileType(tile, MP_RAILWAY); + SetDockingTile(tile, false); + SetTileOwner(tile, owner); } #endif /* RAIL_MAP_H */