From 2ed0f93bfbd27ba4b4dc3e590556ffae6d9b9338 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 4 Nov 2011 10:22:27 +0000 Subject: (svn r23093) -Codechange: add a default NULL for the Z of GetTileSlope and use it --- src/saveload/afterload.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/saveload') 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); } } -- cgit v1.2.3-70-g09d2