From e45bcde09cdfd70213422da3946eb1b2034e80ba Mon Sep 17 00:00:00 2001 From: duncanspumpkin Date: Sat, 5 Jun 2021 08:42:05 +0100 Subject: [PATCH] Fix saves from corrupting due to old guests in park RideTypesBeenOn and RidesBeenOn are not at this moment the type that they say they are so doing a check against that type gives invalid results. --- src/openrct2/ParkFile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openrct2/ParkFile.cpp b/src/openrct2/ParkFile.cpp index 209867aca3..a20133d909 100644 --- a/src/openrct2/ParkFile.cpp +++ b/src/openrct2/ParkFile.cpp @@ -1690,12 +1690,12 @@ namespace OpenRCT2 cs.ReadWrite(guest.NauseaTolerance); cs.ReadWriteArray(guest.RideTypesBeenOn, [&cs](uint8_t& rideType) { cs.ReadWrite(rideType); - return rideType != RIDE_TYPE_NULL; + return true; }); cs.ReadWrite(guest.TimeInQueue); cs.ReadWriteArray(guest.RidesBeenOn, [&cs](ride_id_t& rideId) { cs.ReadWrite(rideId); - return rideId != RIDE_ID_NULL; + return true; }); cs.ReadWrite(guest.CashInPocket); cs.ReadWrite(guest.CashSpent);