From 77dccb995c8c737474ad65feec05f04e83093118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Sat, 28 Aug 2021 15:13:07 +0300 Subject: [PATCH] Use RCT12PeepThoughtItemNone for importers --- src/openrct2/rct1/S4Importer.cpp | 5 ++++- src/openrct2/rct2/S6Importer.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 7e24d90b54..dcdca4c08e 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -2846,7 +2846,10 @@ namespace RCT1 auto srcThought = &src->thoughts[i]; auto dstThought = &dst->Thoughts[i]; dstThought->type = static_cast(srcThought->type); - dstThought->item = srcThought->item; + if (srcThought->item == RCT12PeepThoughtItemNone) + dstThought->item = PeepThoughtItemNone; + else + dstThought->item = srcThought->item; dstThought->freshness = srcThought->freshness; dstThought->fresh_timeout = srcThought->fresh_timeout; } diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 0bf43eb635..ae440fa402 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1721,7 +1721,7 @@ template<> void S6Importer::ImportEntity(const RCT12SpriteBase& baseSrc) auto srcThought = &src->thoughts[i]; auto dstThought = &dst->Thoughts[i]; dstThought->type = static_cast(srcThought->type); - if (srcThought->item == 0xFF) + if (srcThought->item == RCT12PeepThoughtItemNone) dstThought->item = PeepThoughtItemNone; else dstThought->item = srcThought->item;