Merge branch '3p-challenger' into 'master'

HERE COMES A NEW CHALLENGER for 3P + fix DUEL mode bugs

Closes #463

See merge request KartKrew/Kart!1008
This commit is contained in:
James R 2023-03-12 03:22:56 +00:00
commit 01efc8cbd4
2 changed files with 5 additions and 4 deletions

View file

@ -11457,8 +11457,9 @@ void K_CheckSpectateStatus(void)
P_SpectatorJoinGame(&players[respawnlist[i]]); P_SpectatorJoinGame(&players[respawnlist[i]]);
} }
// Reset the match if you're in an empty server // Reset the match when 2P joins 1P, DUEL mode
if (!mapreset && gamestate == GS_LEVEL && leveltime >= starttime && (numingame < 2 && numingame+i >= 2)) // use previous i value // Reset the match when 3P joins 1P and 2P, DUEL mode must be disabled
if (!mapreset && gamestate == GS_LEVEL && (numingame < 3 && numingame+i >= 2)) // use previous i value
{ {
S_ChangeMusicInternal("chalng", false); // COME ON S_ChangeMusicInternal("chalng", false); // COME ON
mapreset = 3*TICRATE; // Even though only the server uses this for game logic, set for everyone for HUD mapreset = 3*TICRATE; // Even though only the server uses this for game logic, set for everyone for HUD

View file

@ -7587,6 +7587,8 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
sector_t *ss; sector_t *ss;
virtlump_t *encoreLump = NULL; virtlump_t *encoreLump = NULL;
K_TimerReset();
levelloading = true; levelloading = true;
// This is needed. Don't touch. // This is needed. Don't touch.
@ -8008,8 +8010,6 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
P_MapEnd(); // just in case MapLoad modifies tm.thing P_MapEnd(); // just in case MapLoad modifies tm.thing
} }
K_TimerReset();
// No render mode or reloading gamestate, stop here. // No render mode or reloading gamestate, stop here.
if (rendermode == render_none || reloadinggamestate) if (rendermode == render_none || reloadinggamestate)
return true; return true;