(svn r11589) -Fix [FS#1514]: when ship depots got destroyed they always returned to water, even when it should've been canals.

This commit is contained in:
rubidium
2007-12-07 21:14:54 +00:00
parent b00f621239
commit c3ae7faa13
6 changed files with 42 additions and 11 deletions

View File

@@ -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;
}