(svn r12070) -Cleanup(r12042): Water-owner of shipdepots is no longer needed. Removed.

This commit is contained in:
frosch
2008-02-06 15:32:06 +00:00
parent 94f4217984
commit e95e887772
5 changed files with 34 additions and 19 deletions

View File

@@ -2333,9 +2333,16 @@ bool AfterLoadGame()
if (_m[t].m5 == 2) {
MakeRiver(t, Random());
} else {
Owner o = GetTileOwner(t);
if (IsWater(t) && o != OWNER_WATER) {
MakeCanal(t, o, Random());
if (IsWater(t)) {
Owner o = GetTileOwner(t);
if (o == OWNER_WATER) {
MakeWater(t);
} else {
MakeCanal(t, o, Random());
}
} else if (IsShipDepot(t)) {
Owner o = (Owner)_m[t].m4; // Original water owner
SetWaterClass(t, o == OWNER_WATER ? WATER_CLASS_SEA : WATER_CLASS_CANAL);
}
}
}
@@ -2347,7 +2354,7 @@ bool AfterLoadGame()
for (TileIndex t = 0; t < map_size; t++) {
if (GetTileSlope(t, NULL) != SLOPE_FLAT) continue;
if (IsTileType(t, MP_WATER) && (GetWaterTileType(t) == WATER_TILE_LOCK || IsShipDepot(t))) SetWaterClassDependingOnSurroundings(t);
if (IsTileType(t, MP_WATER) && IsLock(t)) SetWaterClassDependingOnSurroundings(t);
if (IsTileType(t, MP_STATION) && (IsDock(t) || IsBuoy(t))) SetWaterClassDependingOnSurroundings(t);
}
}