diff options
Diffstat (limited to 'src/water_map.h')
-rw-r--r-- | src/water_map.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/water_map.h b/src/water_map.h index 5d1a60c1d..c4c131173 100644 --- a/src/water_map.h +++ b/src/water_map.h @@ -85,6 +85,11 @@ static inline DiagDirection GetShipDepotDirection(TileIndex t) return XYNSToDiagDir(GetShipDepotAxis(t), GB(_m[t].m5, 0, 1)); } +static inline Owner GetShipDepotWaterOwner(TileIndex t) +{ + return (Owner)_m[t].m4; +} + static inline DiagDirection GetLockDirection(TileIndex t) { return (DiagDirection)GB(_m[t].m5, 0, 2); @@ -128,13 +133,13 @@ static inline void MakeCanal(TileIndex t, Owner o) _m[t].m5 = 0; } -static inline void MakeShipDepot(TileIndex t, Owner o, DepotPart base, Axis a) +static inline void MakeShipDepot(TileIndex t, Owner o, DepotPart base, Axis a, Owner original_owner) { SetTileType(t, MP_WATER); SetTileOwner(t, o); _m[t].m2 = 0; _m[t].m3 = 0; - _m[t].m4 = 0; + _m[t].m4 = original_owner; _m[t].m5 = base + a * 2; } |