From d88ae509234c6aeb6181c8f3ab616bd8db0ef624 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 18 Jul 2020 13:38:16 +0200 Subject: [PATCH] - moved a few global variables around so that they don't get lost for handling savegames or a global state reset. --- source/games/duke/src/actors.cpp | 2 -- source/games/duke/src/game.h | 1 + source/games/duke/src/game_misc.cpp | 1 - source/games/duke/src/sbar.cpp | 2 -- source/games/duke/src/sectors_r.cpp | 2 -- source/games/duke/src/zz_game.cpp | 5 +++++ 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index 46eafff2e..3b65c1b7b 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -47,8 +47,6 @@ This file is a combination of code from the following sources: BEGIN_DUKE_NS -int otherp; - int adjustfall(spritetype* s, int c); diff --git a/source/games/duke/src/game.h b/source/games/duke/src/game.h index 2ec513c47..c0af896f4 100644 --- a/source/games/duke/src/game.h +++ b/source/games/duke/src/game.h @@ -74,6 +74,7 @@ extern int32_t otherp; extern ActorInfo actorinfo[MAXTILES]; extern weaponhit hittype[MAXSPRITES]; +extern bool sound445done; #endif diff --git a/source/games/duke/src/game_misc.cpp b/source/games/duke/src/game_misc.cpp index b5c5d2ad4..a78e3a942 100644 --- a/source/games/duke/src/game_misc.cpp +++ b/source/games/duke/src/game_misc.cpp @@ -46,7 +46,6 @@ BEGIN_DUKE_NS FFont* IndexFont; FFont* DigiFont; -int rtsplaying; //--------------------------------------------------------------------------- // diff --git a/source/games/duke/src/sbar.cpp b/source/games/duke/src/sbar.cpp index ea8e1beae..8c139b8bd 100644 --- a/source/games/duke/src/sbar.cpp +++ b/source/games/duke/src/sbar.cpp @@ -41,8 +41,6 @@ source as it is released. #include "texturemanager.h" BEGIN_DUKE_NS -int levelTextTime; - //========================================================================== // // very much a dummy to access the methods. diff --git a/source/games/duke/src/sectors_r.cpp b/source/games/duke/src/sectors_r.cpp index d927114d5..8c524564c 100644 --- a/source/games/duke/src/sectors_r.cpp +++ b/source/games/duke/src/sectors_r.cpp @@ -35,8 +35,6 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms // PRIMITIVE BEGIN_DUKE_NS -static bool sound445done; // what is this supposed to do? Looks broken. - //--------------------------------------------------------------------------- // // diff --git a/source/games/duke/src/zz_game.cpp b/source/games/duke/src/zz_game.cpp index f5f3a4cb1..b9fec71d7 100644 --- a/source/games/duke/src/zz_game.cpp +++ b/source/games/duke/src/zz_game.cpp @@ -46,6 +46,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. BEGIN_DUKE_NS +int levelTextTime; // must be serialized +int rtsplaying; // must be serialized +int otherp; // MP only +bool sound445done; // this was local state inside a function, but this must be maintained globally and serialized + int16_t max_ammo_amount[MAX_WEAPONS]; int32_t spriteqamount = 64;