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:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user