From 693cfb207573d894cf832afc9fb877c920bbda0a Mon Sep 17 00:00:00 2001 From: Hielke Morsink Date: Sun, 16 May 2021 16:14:53 +0200 Subject: [PATCH] Correctly handle consecutive corrupt elements --- src/openrct2/rct2/S6Importer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 2c312a024d..cf78e8651b 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1019,7 +1019,10 @@ public: auto tileElementType = static_cast(srcElement->GetType()); if (tileElementType == RCT12TileElementType::Corrupt) { - nextElementInvisible = true; + // One property of corrupt elements was to hide tops of tower tracks, and to avoid the next element from + // being hidden, multiple consecutive corrupt elements were sometimes used. This would essentially + // toggle the flag, so we inverse nextElementInvisible here instead of always setting it to true. + nextElementInvisible = !nextElementInvisible; continue; } if (tileElementType == RCT12TileElementType::EightCarsCorrupt14