summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-11-04 10:22:27 +0000
committerrubidium <rubidium@openttd.org>2011-11-04 10:22:27 +0000
commit2ed0f93bfbd27ba4b4dc3e590556ffae6d9b9338 (patch)
tree9086d7e7b83871e60d43d838fd5f005ef50c5063 /src/saveload
parenta36551dbb4a6aa8a10e99df8331ac4ecb8586270 (diff)
downloadopenttd-2ed0f93bfbd27ba4b4dc3e590556ffae6d9b9338.tar.xz
(svn r23093) -Codechange: add a default NULL for the Z of GetTileSlope and use it
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/afterload.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index c8cc0dd81..3d660db37 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -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);
}
}