(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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user