(svn r23093) -Codechange: add a default NULL for the Z of GetTileSlope and use it
This commit is contained in:
@@ -77,7 +77,7 @@ void SetWaterClassDependingOnSurroundings(TileIndex t, bool include_invalid_wate
|
||||
{
|
||||
/* If the slope is not flat, we always assume 'land' (if allowed). Also for one-corner-raised-shores.
|
||||
* Note: Wrt. autosloping under industry tiles this is the most fool-proof behaviour. */
|
||||
if (GetTilePixelSlope(t, NULL) != SLOPE_FLAT) {
|
||||
if (GetTileSlope(t) != SLOPE_FLAT) {
|
||||
if (include_invalid_water_class) {
|
||||
SetWaterClass(t, WATER_CLASS_INVALID);
|
||||
return;
|
||||
@@ -1060,7 +1060,7 @@ bool AfterLoadGame()
|
||||
if (GB(_m[t].m5, 3, 2) == 0) {
|
||||
MakeClear(t, CLEAR_GRASS, 3);
|
||||
} else {
|
||||
if (GetTilePixelSlope(t, NULL) != SLOPE_FLAT) {
|
||||
if (GetTileSlope(t) != SLOPE_FLAT) {
|
||||
MakeShore(t);
|
||||
} else {
|
||||
if (GetTileOwner(t) == OWNER_WATER) {
|
||||
@@ -1670,7 +1670,7 @@ bool AfterLoadGame()
|
||||
* on its neighbouring tiles. Done after river and canal updates to
|
||||
* ensure neighbours are correct. */
|
||||
for (TileIndex t = 0; t < map_size; t++) {
|
||||
if (GetTilePixelSlope(t, NULL) != SLOPE_FLAT) continue;
|
||||
if (GetTileSlope(t) != SLOPE_FLAT) continue;
|
||||
|
||||
if (IsTileType(t, MP_WATER) && IsLock(t)) SetWaterClassDependingOnSurroundings(t, false);
|
||||
if (IsTileType(t, MP_STATION) && (IsDock(t) || IsBuoy(t))) SetWaterClassDependingOnSurroundings(t, false);
|
||||
@@ -2355,7 +2355,7 @@ bool AfterLoadGame()
|
||||
if (IsSavegameVersionBefore(149)) {
|
||||
for (TileIndex t = 0; t < map_size; t++) {
|
||||
if (!IsTileType(t, MP_STATION)) continue;
|
||||
if (!IsBuoy(t) && !IsOilRig(t) && !(IsDock(t) && GetTilePixelSlope(t, NULL) == SLOPE_FLAT)) {
|
||||
if (!IsBuoy(t) && !IsOilRig(t) && !(IsDock(t) && GetTileSlope(t) == SLOPE_FLAT)) {
|
||||
SetWaterClass(t, WATER_CLASS_INVALID);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user