Further clean up

This commit is contained in:
duncanspumpkin 2019-08-18 12:27:07 +01:00
parent 11aa41c4c4
commit 6c4031c323
2 changed files with 3 additions and 4 deletions

View File

@ -117,7 +117,7 @@ public:
{
if (_loc.z == 0)
{
if (!map_is_location_in_park({ _loc.x, _loc.y }))
if (!map_is_location_in_park(_loc))
{
return std::make_unique<WallPlaceActionResult>(GA_ERROR::NOT_OWNED);
}
@ -613,7 +613,7 @@ private:
*wallAcrossTrack = false;
gMapGroundFlags = ELEMENT_IS_ABOVE_GROUND;
if (map_is_location_at_edge({ _loc.x, _loc.y }))
if (map_is_location_at_edge(_loc))
{
gGameCommandErrorText = STR_OFF_EDGE_OF_MAP;
return false;

View File

@ -65,8 +65,7 @@ public:
res->ExpenditureType = RCT_EXPENDITURE_TYPE_LANDSCAPING;
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !map_is_location_in_park({ _loc.x, _loc.y })
&& !gCheatsSandboxMode)
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !map_is_location_in_park(_loc) && !gCheatsSandboxMode)
{
return MakeResult(GA_ERROR::NOT_OWNED, STR_CANT_REPAINT_THIS, STR_LAND_NOT_OWNED_BY_PARK);
}