Fix #16791: rotodrop top piece is replicated (#19970)

* Fix rotodrop top piece replication issue (#16791)

* Add changelog entry

* Raise network version

* Move changelog entry
This commit is contained in:
Wenzhao Qiu authored and GitHub committed 2023-04-21 09:48:17 -03:00
1 parent 784237202b
commit 8f0db4cb20
3 files changed
+8

No files matched your search

+1
View File
@@ -219,6 +219,7 @@ The following people are not part of the development team, but have been contrib
* Joel H. (HtotheTML)
* John Mulcahy (jayjay300)
* Chase Percy (Chase-Percy)
* Wenzhao Qiu (qwzhaox)
## Toolchain
* (Balletie) - macOS
+1
View File
@@ -15,6 +15,7 @@
- Improved: [#19953] Add keyboard shortcut to Keyboard Shortcuts window.
- Fix: [#12598] Number of holes is not set correctly when saving track designs.
- Fix: [#13130] Android always defaulting to UK locale for language, currency and temperature.
- Fix: [#16791] Rotodrop top piece replicates when walls are placed around it and clearance checks are disabled (original bug).
- Fix: [#18895] Responding mechanic blocked at level crossing.
- Fix: [#19231] Crash due to null pointer to previously deleted banner in tile copy/paste functionality
- Fix: [#19296] Crash due to a race condition for parallel object loading.
+6
View File
@@ -186,6 +186,12 @@ static void PaintRotoDropTowerSection(
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 8, 8, height }, { 2, 2, 30 } });
const TileElement* nextTileElement = reinterpret_cast<const TileElement*>(&trackElement) + 1;
while (nextTileElement->GetType() != TileElementType::Track && !nextTileElement->IsLastForTile())
{
nextTileElement++;
}
if (trackElement.IsLastForTile() || trackElement.GetClearanceZ() != nextTileElement->GetBaseZ())
{
imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_ROTO_DROP_TOWER_SEGMENT_TOP);