1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 23:04:36 +01:00

Clean up many other coordinates

This commit is contained in:
Gymnasiast
2020-03-13 12:03:43 +01:00
parent 3412c47a9e
commit bdf681f440
32 changed files with 132 additions and 172 deletions

View File

@@ -1498,17 +1498,16 @@ static void window_ride_update_overall_view(Ride* ride)
if (it.element->AsTrack()->GetRideIndex() != ride->id)
continue;
int32_t x = it.x * 32;
int32_t y = it.y * 32;
auto location = TileCoordsXY(it.x, it.y).ToCoordsXY();
int32_t baseZ = it.element->GetBaseZ();
int32_t clearZ = it.element->GetClearanceZ();
minx = std::min(minx, x);
miny = std::min(miny, y);
minx = std::min(minx, location.x);
miny = std::min(miny, location.y);
minz = std::min(minz, baseZ);
maxx = std::max(maxx, x);
maxy = std::max(maxy, y);
maxx = std::max(maxx, location.x);
maxy = std::max(maxy, location.y);
maxz = std::max(maxz, clearZ);
}