1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 03:53:07 +01:00

Adjust S6 import/export for different thought item type

This commit is contained in:
ζeh Matt
2021-08-28 00:06:29 +03:00
parent 1555a4da9f
commit 483fb173f5
2 changed files with 5 additions and 2 deletions

View File

@@ -1342,7 +1342,7 @@ template<> void S6Exporter::ExportEntity(RCT2SpritePeep* dst, const Guest* src)
auto srcThought = &src->Thoughts[i];
auto dstThought = &dst->thoughts[i];
dstThought->type = static_cast<uint8_t>(srcThought->type);
dstThought->item = srcThought->item;
dstThought->item = static_cast<uint8_t>(srcThought->item);
dstThought->freshness = srcThought->freshness;
dstThought->fresh_timeout = srcThought->fresh_timeout;
}

View File

@@ -1721,7 +1721,10 @@ template<> void S6Importer::ImportEntity<Guest>(const RCT12SpriteBase& baseSrc)
auto srcThought = &src->thoughts[i];
auto dstThought = &dst->Thoughts[i];
dstThought->type = static_cast<PeepThoughtType>(srcThought->type);
dstThought->item = srcThought->item;
if (srcThought->item == 0xFF)
dstThought->item = PeepThoughtItemNone;
else
dstThought->item = srcThought->item;
dstThought->freshness = srcThought->freshness;
dstThought->fresh_timeout = srcThought->fresh_timeout;
}