From 6478b98eeaa06df4bcac4968f36221f18470c3df Mon Sep 17 00:00:00 2001 From: MajorCooke Date: Tue, 15 Dec 2015 07:19:41 -0600 Subject: [PATCH] Update serialization to BYTE from WORD for older save games. --- src/p_user.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/p_user.cpp b/src/p_user.cpp index 331a978b7..15c5055c9 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -3043,6 +3043,12 @@ void player_t::Serialize (FArchive &arc) WeaponState = ((cheats >> 14) & 1) | ((cheats & (0x37 << 24)) >> (24 - 1)); cheats &= ~((1 << 14) | (0x37 << 24)); } + if (SaveVersion < 4526) + { + BYTE oldWeaponState; + arc << oldWeaponState; + WeaponState = oldWeaponState; + } else { arc << WeaponState;