mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
Fix #6009. Actually check for the correct map element when deleteing.
Mistake made during refactor. The old code passed the map element type and quadrant in the same parameter. I refactored it so that it only checked the quadrant.
This commit is contained in:
committed by
Michael Steenbeek
parent
38c504685e
commit
c595d24ebd
@@ -82,6 +82,8 @@ static money32 SmallSceneryRemove(sint16 x, sint16 y, sint8 baseHeight, uint8 qu
|
|||||||
bool sceneryFound = false;
|
bool sceneryFound = false;
|
||||||
rct_map_element* mapElement = map_get_first_element_at(x / 32, y / 32);
|
rct_map_element* mapElement = map_get_first_element_at(x / 32, y / 32);
|
||||||
do {
|
do {
|
||||||
|
if (map_element_get_type(mapElement) != MAP_ELEMENT_TYPE_SCENERY)
|
||||||
|
continue;
|
||||||
if ((mapElement->type >> 6) != quadrant)
|
if ((mapElement->type >> 6) != quadrant)
|
||||||
continue;
|
continue;
|
||||||
if (mapElement->base_height != baseHeight)
|
if (mapElement->base_height != baseHeight)
|
||||||
|
|||||||
Reference in New Issue
Block a user