1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00

Fix read / writing of peep thoughts / rides

This commit is contained in:
Ted John
2021-04-03 12:53:02 +01:00
parent 8ff525270d
commit 0fd3c625f7

View File

@@ -925,7 +925,7 @@ namespace OpenRCT2
cs.ReadWrite(entity.PeepDirection);
cs.ReadWrite(entity.InteractionRideIndex);
cs.ReadWrite(entity.TimeInQueue);
cs.ReadWriteArray(entity.RidesBeenOn, [&cs](ride_id_t rideId) {
cs.ReadWriteArray(entity.RidesBeenOn, [&cs](ride_id_t& rideId) {
cs.ReadWrite(rideId);
return true;
});
@@ -937,19 +937,12 @@ namespace OpenRCT2
cs.ReadWrite(entity.RejoinQueueTimeout);
cs.ReadWrite(entity.PreviousRide);
cs.ReadWrite(entity.PreviousRideTimeOut);
cs.ReadWriteArray(entity.Thoughts, [&cs](rct_peep_thought thought) {
if (thought.type != PeepThoughtType::None)
{
cs.ReadWrite(thought.type);
cs.ReadWrite(thought.item);
cs.ReadWrite(thought.freshness);
cs.ReadWrite(thought.fresh_timeout);
return true;
}
else
{
return false;
}
cs.ReadWriteArray(entity.Thoughts, [&cs](rct_peep_thought& thought) {
cs.ReadWrite(thought.type);
cs.ReadWrite(thought.item);
cs.ReadWrite(thought.freshness);
cs.ReadWrite(thought.fresh_timeout);
return true;
});
cs.ReadWrite(entity.PathCheckOptimisation);
cs.ReadWrite(entity.GuestHeadingToRideId);