mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix some erroneous use of LOCATION_NULL
Found by @janisozaur and introduced in PR #6461.
This commit is contained in:
parent
33dd3b2275
commit
4290d0a65d
|
@ -1290,7 +1290,7 @@ static void window_map_set_peep_spawn_tool_update(sint32 x, sint32 y)
|
|||
gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE;
|
||||
gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW;
|
||||
footpath_bridge_get_info_from_pos(x, y, &mapX, &mapY, &direction, &mapElement);
|
||||
if ((mapX & 0xFFFF) == LOCATION_NULL)
|
||||
if ((mapX & 0xFFFF) == 0x8000)
|
||||
return;
|
||||
|
||||
mapZ = mapElement->base_height * 8;
|
||||
|
@ -1351,7 +1351,7 @@ static void window_map_set_peep_spawn_tool_down(sint32 x, sint32 y)
|
|||
sint32 mapX, mapY, mapZ, direction;
|
||||
|
||||
footpath_get_coordinates_from_pos(x, y, &mapX, &mapY, &direction, &mapElement);
|
||||
if (mapX == LOCATION_NULL)
|
||||
if (mapX == 0x8000)
|
||||
return;
|
||||
|
||||
surfaceMapElement = map_get_surface_element_at(mapX >> 5, mapY >> 5);
|
||||
|
|
|
@ -338,7 +338,7 @@ static void window_staff_list_tooldown(rct_window *w, rct_widgetindex widgetInde
|
|||
sint32 direction;
|
||||
rct_map_element *mapElement;
|
||||
footpath_get_coordinates_from_pos(x, y, &x, &y, &direction, &mapElement);
|
||||
if (x == LOCATION_NULL)
|
||||
if (x == 0x8000)
|
||||
return;
|
||||
|
||||
bool isPatrolAreaSet = staff_is_patrol_area_set(200 + selectedPeepType, x, y);
|
||||
|
|
|
@ -304,7 +304,7 @@ public:
|
|||
window_invalidate_by_class(WC_RIDE_LIST);
|
||||
|
||||
res->ExpenditureType = RCT_EXPENDITURE_TYPE_RIDE_CONSTRUCTION;
|
||||
res->Position.x = LOCATION_NULL;
|
||||
res->Position.x = 0x8000;
|
||||
|
||||
return std::move(res);
|
||||
}
|
||||
|
|
|
@ -572,7 +572,7 @@ uint16 hire_new_staff_member(uint8 staffType)
|
|||
|
||||
sint32 command_x, ebx, command_y, command_z, esi, new_sprite_index, ebp;
|
||||
command_y = command_z = esi = new_sprite_index = ebp = 0;
|
||||
command_x = LOCATION_NULL;
|
||||
command_x = 0x8000;
|
||||
|
||||
sint32 autoposition = gConfigGeneral.auto_staff_placement;
|
||||
if (gInputPlaceObjectModifier & PLACE_OBJECT_MODIFIER_SHIFT_Z)
|
||||
|
|
Loading…
Reference in New Issue