mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-24 23:34:37 +01:00
Propagate error upward with LOCATION_NULL
This commit is contained in:
@@ -1379,6 +1379,7 @@ static void sub_6E1F34(
|
||||
|
||||
auto mapCoords = screen_get_map_xy_quadrant_with_z({ x, y }, z, &cl);
|
||||
if (!mapCoords)
|
||||
*grid_x = LOCATION_NULL;
|
||||
return;
|
||||
*grid_x = mapCoords->x;
|
||||
*grid_y = mapCoords->y;
|
||||
@@ -1561,6 +1562,7 @@ static void sub_6E1F34(
|
||||
int16_t z = gSceneryCtrlPressZ;
|
||||
auto mapCoords = screen_get_map_xy_side_with_z({ x, y }, z, &cl);
|
||||
if (!mapCoords)
|
||||
*grid_x = LOCATION_NULL;
|
||||
return;
|
||||
*grid_x = mapCoords->x;
|
||||
*grid_y = mapCoords->y;
|
||||
|
||||
Reference in New Issue
Block a user