From bacc6e9f03e690bd1bf3d90e7f10583be5bd397e Mon Sep 17 00:00:00 2001 From: Cameron Reikes Date: Sat, 12 Nov 2022 11:34:53 -0800 Subject: [PATCH] Serialize last used medbay --- gamestate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gamestate.c b/gamestate.c index 46b662c..7341e89 100644 --- a/gamestate.c +++ b/gamestate.c @@ -769,6 +769,7 @@ enum GameVersion VAddedSerToDisk, VRemovedTest, VChangedVectorSerializing, + VAddedLastUsedMedbay, VMax, // this minus one will be the version used }; @@ -829,6 +830,8 @@ SerMaybeFailure ser_player(SerState* ser, Player* p) { SER_VAR(&p->unlocked_bombs); SER_MAYBE_RETURN(ser_entityid(ser, &p->entity)); + if (ser->version >= VAddedLastUsedMedbay) + SER_MAYBE_RETURN(ser_entityid(ser, &p->last_used_medbay)); SER_MAYBE_RETURN(ser_inputframe(ser, &p->input)); }