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