Adjust S6 import/export for different thought item type

This commit is contained in:
ζeh Matt committed 2021-08-30 21:13:34 +03:00
1 parent 1555a4da9f
commit 483fb173f5
2 files changed
+5 -2

No files matched your search

+1 -1
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;
}
+4 -1
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;
}