From d20ca3d919127b8d3cf850af3d68fba1cd597579 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Mon, 31 Jul 2023 19:44:50 +0100 Subject: [PATCH] reset emeralds and luabanks in G_InitNew, not Got_Mapcmd --- src/d_netcmd.c | 6 ------ src/g_game.c | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 1b987bcf1..6cf519147 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -2146,12 +2146,6 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum) if (demoplayback && !timingdemo) precache = false; - if (resetplayer && !FLS) - { - emeralds = 0; - memset(&luabanks, 0, sizeof(luabanks)); - } - if (modeattacking) { SetPlayerSkinByNum(0, cv_chooseskin.value-1); diff --git a/src/g_game.c b/src/g_game.c index b8c434998..a1fd2e6ec 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -5048,6 +5048,12 @@ void G_InitNew(UINT8 pultmode, const char *mapname, boolean resetplayer, boolean numgameovers = tokenlist = token = sstimer = redscore = bluescore = lastmap = 0; countdown = countdown2 = exitfadestarted = 0; + if (!FLS) + { + emeralds = 0; + memset(&luabanks, 0, sizeof(luabanks)); + } + for (i = 0; i < MAXPLAYERS; i++) { players[i].playerstate = PST_REBORN;