Fix tile_element_height to use mapCoords instead of screenCoords

This commit is contained in:
Tulio Leao authored and GitHub committed 2019-11-14 10:50:10 -03:00
1 parent fe3d6f6faf
commit cc12dbf238
1 file changed
+1 -1
+1 -1
View File
@@ -566,7 +566,7 @@ static void window_map_scrollmousedown(rct_window* w, int32_t scrollIndex, Scree
CoordsXY c = map_window_screen_to_map(screenCoords);
int32_t mapX = std::clamp(c.x, 0, MAXIMUM_MAP_SIZE_TECHNICAL * 32 - 1);
int32_t mapY = std::clamp(c.y, 0, MAXIMUM_MAP_SIZE_TECHNICAL * 32 - 1);
int32_t mapZ = tile_element_height({ screenCoords.x, screenCoords.y });
int32_t mapZ = tile_element_height({ mapX, mapY });
rct_window* mainWindow = window_get_main();
if (mainWindow != nullptr)