1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +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:
duncanspumpkin
2017-07-27 20:40:43 +01:00
committed by Michael Steenbeek
parent 38c504685e
commit c595d24ebd

View File

@@ -82,6 +82,8 @@ static money32 SmallSceneryRemove(sint16 x, sint16 y, sint8 baseHeight, uint8 qu
bool sceneryFound = false;
rct_map_element* mapElement = map_get_first_element_at(x / 32, y / 32);
do {
if (map_element_get_type(mapElement) != MAP_ELEMENT_TYPE_SCENERY)
continue;
if ((mapElement->type >> 6) != quadrant)
continue;
if (mapElement->base_height != baseHeight)