Add constants for min and max footpath height

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

No files matched your search

+2 -2
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);
}
@@ -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);
}
+3
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)