From e6e9bac04b857cf73221d882795b5a1279cf23f8 Mon Sep 17 00:00:00 2001 From: carnivoroussociety <38839485+carnivoroussociety@users.noreply.github.com> Date: Thu, 7 Oct 2021 16:32:19 +1000 Subject: [PATCH] Add ifdef'd correct code for DUDEEXTRA struct saving --- source/games/blood/src/loadsave.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/games/blood/src/loadsave.cpp b/source/games/blood/src/loadsave.cpp index 64b0536bb..9bd865ef2 100644 --- a/source/games/blood/src/loadsave.cpp +++ b/source/games/blood/src/loadsave.cpp @@ -437,7 +437,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, DUDEEXTRA& w, DUDE if (arc.BeginObject(keyname)) { - // Note: birthCounter/thinkTime are a union and share the same value (this is used for savefile backwards compatibility) + // Note: birthCounter/thinkTime are a union and share the same value (this is used for savefile backwards compatibility - see correct implementation below) arc("time", w.time, &empty) ("recoil", w.teslaHit, &empty2) ("prio", w.prio, &empty) @@ -445,6 +445,13 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, DUDEEXTRA& w, DUDE ("x2", w.stats.thinkTime, &empty) ("x3", w.stats.active, &empty2) .EndObject(); +#if 0 + arc("time", w.time, &empty) + ("teslaHit", w.teslaHit, &empty2) + ("prio", w.prio, &empty) + ("thinkTime", w.stats.thinkTime, &empty) + ("active", w.stats.active, &empty2) +#endif } return arc; }