mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-31 10:45:16 +01:00
Fix #8120: Crash trying to place peep spawn outside of map
This commit is contained in:
committed by
Michael Steenbeek
parent
925af2ccf1
commit
f186860afd
@@ -19,6 +19,7 @@
|
||||
- Fix: [#8062] In multiplayer warnings for unstable cheats are shown when disabling them.
|
||||
- Fix: [#8090] Maze designs saved incorrectly.
|
||||
- Fix: [#8101] Title sequences window flashes after opening.
|
||||
- Fix: [#8120] Crash trying to place peep spawn outside of map.
|
||||
- Improved: [#2940] Allow mouse-dragging to set patrol area (Singleplayer only).
|
||||
- Improved: [#7730] Draw extreme vertical and lateral Gs red in the ride window's graph tab.
|
||||
- Improved: [#7930] Automatically create folders for custom content.
|
||||
|
||||
@@ -1332,7 +1332,7 @@ static void window_map_set_peep_spawn_tool_down(int32_t x, int32_t y)
|
||||
|
||||
// Verify footpath exists at location, and retrieve coordinates
|
||||
footpath_get_coordinates_from_pos(x, y, &mapX, &mapY, &direction, &tileElement);
|
||||
if (mapX == 0x8000)
|
||||
if (mapX == LOCATION_NULL)
|
||||
return;
|
||||
|
||||
mapZ = tileElement->base_height * 8;
|
||||
|
||||
@@ -342,7 +342,7 @@ static void window_staff_list_tooldown(rct_window* w, rct_widgetindex widgetInde
|
||||
int32_t direction;
|
||||
rct_tile_element* tileElement;
|
||||
footpath_get_coordinates_from_pos(x, y, &x, &y, &direction, &tileElement);
|
||||
if (x == 0x8000)
|
||||
if (x == LOCATION_NULL)
|
||||
return;
|
||||
|
||||
bool isPatrolAreaSet = staff_is_patrol_area_set(200 + selectedPeepType, x, y);
|
||||
|
||||
Reference in New Issue
Block a user