mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-24 03:12:03 -05:00
Use helper function
This commit is contained in:
parent
421107436f
commit
3b8bf56b71
1 changed files with 1 additions and 1 deletions
|
@ -1817,7 +1817,7 @@ CoordsXY screen_get_map_xy_with_z(ScreenCoordsXY screenCoords, int16_t z)
|
|||
|
||||
auto vpCoords = screen_coord_to_viewport_coord(viewport, screenCoords);
|
||||
auto mapPosition = viewport_coord_to_map_coord(vpCoords.x, vpCoords.y, z);
|
||||
if (mapPosition.x < 0 || mapPosition.x >= (256 * 32) || mapPosition.y < 0 || mapPosition.y > (256 * 32))
|
||||
if (!map_is_location_valid(mapPosition))
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue