From cbb2d39860a847687019ab47095646e593fb5bc8 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 7 Dec 2007 21:14:54 +0000 Subject: (svn r11589) -Fix [FS#1514]: when ship depots got destroyed they always returned to water, even when it should've been canals. --- src/water_map.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/water_map.h') 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; } -- cgit v1.2.3-54-g00ecf