reset emeralds and luabanks in G_InitNew, not Got_Mapcmd

This commit is contained in:
Monster Iestyn 2023-07-31 19:44:50 +01:00
parent 952c84050b
commit d20ca3d919
2 changed files with 6 additions and 6 deletions

View file

@ -2146,12 +2146,6 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
if (demoplayback && !timingdemo) if (demoplayback && !timingdemo)
precache = false; precache = false;
if (resetplayer && !FLS)
{
emeralds = 0;
memset(&luabanks, 0, sizeof(luabanks));
}
if (modeattacking) if (modeattacking)
{ {
SetPlayerSkinByNum(0, cv_chooseskin.value-1); SetPlayerSkinByNum(0, cv_chooseskin.value-1);

View file

@ -5048,6 +5048,12 @@ void G_InitNew(UINT8 pultmode, const char *mapname, boolean resetplayer, boolean
numgameovers = tokenlist = token = sstimer = redscore = bluescore = lastmap = 0; numgameovers = tokenlist = token = sstimer = redscore = bluescore = lastmap = 0;
countdown = countdown2 = exitfadestarted = 0; countdown = countdown2 = exitfadestarted = 0;
if (!FLS)
{
emeralds = 0;
memset(&luabanks, 0, sizeof(luabanks));
}
for (i = 0; i < MAXPLAYERS; i++) for (i = 0; i < MAXPLAYERS; i++)
{ {
players[i].playerstate = PST_REBORN; players[i].playerstate = PST_REBORN;