1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Restrict FootpathPlaceAction more correctly

direction_valid() restricts the direction to 0-3, not 0-15. As discussed on Gitter, this is more correct.
This commit is contained in:
Richard Fine
2019-09-01 15:40:10 +01:00
parent caa6ad71c7
commit bf3461e014

View File

@@ -88,7 +88,7 @@ public:
return MakeResult(GA_ERROR::DISALLOWED, STR_CANT_BUILD_FOOTPATH_HERE, STR_TOO_HIGH);
}
if (_direction != 0xFF && _direction > 15)
if (_direction != INVALID_DIRECTION && !direction_valid(_direction))
{
log_error("Direction invalid. direction = %u", _direction);
return MakeResult(GA_ERROR::INVALID_PARAMETERS, STR_CANT_BUILD_FOOTPATH_HERE);