From 4ec213f6804891130f8cc70e78678decfa80b2a8 Mon Sep 17 00:00:00 2001 From: Hielke Morsink Date: Thu, 21 Dec 2017 17:02:09 +0100 Subject: [PATCH] Allow building through water with clearance disabled --- src/openrct2/ride/Track.cpp | 2 +- src/openrct2/world/map.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openrct2/ride/Track.cpp b/src/openrct2/ride/Track.cpp index 41ba32d6f6..6404c2dfaa 100644 --- a/src/openrct2/ride/Track.cpp +++ b/src/openrct2/ride/Track.cpp @@ -1290,7 +1290,7 @@ static money32 track_place(sint32 rideIndex, } } - if (gMapGroundFlags & ELEMENT_IS_UNDERWATER) + if (gMapGroundFlags & ELEMENT_IS_UNDERWATER && !gCheatsDisableClearanceChecks) { gGameCommandErrorText = STR_RIDE_CANT_BUILD_THIS_UNDERWATER; return MONEY32_UNDEFINED; diff --git a/src/openrct2/world/map.c b/src/openrct2/world/map.c index eb15f57d79..48215452d3 100644 --- a/src/openrct2/world/map.c +++ b/src/openrct2/world/map.c @@ -3250,7 +3250,7 @@ sint32 map_can_construct_with_clear_at(sint32 x, sint32 y, sint32 zLow, sint32 z continue; } sint32 water_height = map_get_water_height(tile_element) * 2; - if (water_height && water_height > zLow && tile_element->base_height < zHigh) { + if (water_height && water_height > zLow && tile_element->base_height < zHigh && !gCheatsDisableClearanceChecks) { gMapGroundFlags |= ELEMENT_IS_UNDERWATER; if (water_height < zHigh) { goto loc_68BAE6;