1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Use viewport flag constants in window_scroll_to_location (#17427)

This commit is contained in:
Hielke Morsink
2022-06-22 02:49:56 +02:00
committed by GitHub
parent c76d90932e
commit 5b2d1c2527

View File

@@ -830,17 +830,17 @@ void window_scroll_to_location(rct_window* w, const CoordsXYZ& coords)
int16_t height = tile_element_height(coords);
if (coords.z < height - 16)
{
if (!(w->viewport->flags & 1 << 0))
if (!(w->viewport->flags & VIEWPORT_FLAG_UNDERGROUND_INSIDE))
{
w->viewport->flags |= 1 << 0;
w->viewport->flags |= VIEWPORT_FLAG_UNDERGROUND_INSIDE;
w->Invalidate();
}
}
else
{
if (w->viewport->flags & 1 << 0)
if (w->viewport->flags & VIEWPORT_FLAG_UNDERGROUND_INSIDE)
{
w->viewport->flags &= ~(1 << 0);
w->viewport->flags &= ~VIEWPORT_FLAG_UNDERGROUND_INSIDE;
w->Invalidate();
}
}