1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Add constants for min and max footpath height

This commit is contained in:
duncanspumpkin
2019-03-11 17:43:07 +00:00
parent e32b9482b8
commit da377e5b64
3 changed files with 7 additions and 4 deletions

View File

@@ -79,12 +79,12 @@ public:
return MakeResult(GA_ERROR::DISALLOWED, STR_CANT_BUILD_FOOTPATH_HERE, STR_LAND_SLOPE_UNSUITABLE);
}
if (_loc.z / 8 < 2)
if (_loc.z / 8 < FootpathMinHeight)
{
return MakeResult(GA_ERROR::DISALLOWED, STR_CANT_BUILD_FOOTPATH_HERE, STR_TOO_LOW);
}
if (_loc.z / 8 > 248)
if (_loc.z / 8 > FootpathMaxHeight)
{
return MakeResult(GA_ERROR::DISALLOWED, STR_CANT_BUILD_FOOTPATH_HERE, STR_TOO_HIGH);
}

View File

@@ -75,12 +75,12 @@ public:
return MakeResult(GA_ERROR::DISALLOWED, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_LAND_NOT_OWNED_BY_PARK);
}
if (_loc.z / 8 < 2)
if (_loc.z / 8 < FootpathMinHeight)
{
return MakeResult(GA_ERROR::DISALLOWED, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_TOO_LOW);
}
if (_loc.z / 8 > 248)
if (_loc.z / 8 > FootpathMaxHeight)
{
return MakeResult(GA_ERROR::DISALLOWED, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_TOO_HIGH);
}

View File

@@ -21,6 +21,9 @@ enum
PROVISIONAL_PATH_FLAG_2 = (1 << 2),
};
constexpr auto FootpathMaxHeight = 248;
constexpr auto FootpathMinHeight = 2;
#define FOOTPATH_ELEMENT_INSERT_QUEUE 0x80
#pragma pack(push, 1)