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 authored and Michael Steenbeek committed 2017-07-27 21:49:15 +02:00
1 parent 38c504685e
commit c595d24ebd
1 file changed
+2
+2
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)