diff --git a/source/core/cheats.cpp b/source/core/cheats.cpp index 1be698f9b..bdbec4080 100644 --- a/source/core/cheats.cpp +++ b/source/core/cheats.cpp @@ -334,7 +334,7 @@ CCMD(levelwarp) auto map = levelwarp_common(argv, "levelwarp", "warp to"); if (map) { - ChangeLevel(map, -1); + ChangeLevel(map, g_nextskill); } } @@ -355,7 +355,7 @@ CCMD(levelstart) auto map = levelwarp_common(argv, "start game", "start new game at"); if (map) { - DeferredStartGame(map, -1); + DeferredStartGame(map, g_nextskill); } } @@ -405,7 +405,7 @@ CCMD(changemap) Printf(PRINT_BOLD, "%s: map file not found\n", map->fileName.GetChars()); } - ChangeLevel(map, -1); + ChangeLevel(map, g_nextskill); } //--------------------------------------------------------------------------- @@ -445,7 +445,7 @@ CCMD(map) Printf(PRINT_BOLD, "%s: map file not found\n", map->fileName.GetChars()); } - DeferredStartGame(map, -1); + DeferredStartGame(map, g_nextskill); } } @@ -462,7 +462,7 @@ CCMD(restartmap) Printf("Must be in a game to restart a level.\n"); return; } - ChangeLevel(currentLevel, -1); + ChangeLevel(currentLevel, g_nextskill); } //--------------------------------------------------------------------------- @@ -493,7 +493,7 @@ CUSTOM_CVAR(Float, i_timescale, 1.0f, CVAR_NOINITCALL) CCMD(endofgame) { STAT_Update(true); - ChangeLevel(nullptr, -1); + ChangeLevel(nullptr, g_nextskill); } //--------------------------------------------------------------------------- diff --git a/source/core/mainloop.cpp b/source/core/mainloop.cpp index 7ce5788de..4011c4952 100644 --- a/source/core/mainloop.cpp +++ b/source/core/mainloop.cpp @@ -688,7 +688,7 @@ void MainLoop () userConfig.CommandMap = ""; if (maprecord) { - DeferredStartGame(maprecord, -1); + DeferredStartGame(maprecord, g_nextskill); } } diff --git a/source/games/blood/src/messages.cpp b/source/games/blood/src/messages.cpp index 40d5307d8..89df92bea 100644 --- a/source/games/blood/src/messages.cpp +++ b/source/games/blood/src/messages.cpp @@ -421,7 +421,7 @@ static bool cheatMario(cheatseq_t* c) if (parseArgs((char*)c->Args, &nEpisode, &nLevel) == 2) { auto map = FindMapByIndex(nEpisode, nLevel); - if (map) DeferredStartGame(map, -1); + if (map) DeferredStartGame(map, g_nextskill); } return true; } diff --git a/source/games/duke/src/cheats.cpp b/source/games/duke/src/cheats.cpp index e87bce1fc..a98cdefa1 100644 --- a/source/games/duke/src/cheats.cpp +++ b/source/games/duke/src/cheats.cpp @@ -299,7 +299,7 @@ static bool cheatLevel(cheatseq_t *s) auto map = FindMapByIndex(volnume, levnume); if (map) { - ChangeLevel(map, -1); + ChangeLevel(map, g_nextskill); } return true; } diff --git a/source/games/duke/src/gameexec.cpp b/source/games/duke/src/gameexec.cpp index e2d0b2751..0205f4e0a 100644 --- a/source/games/duke/src/gameexec.cpp +++ b/source/games/duke/src/gameexec.cpp @@ -3444,7 +3444,7 @@ int ParseState::parse(void) levnume = GetGameVarID(*insptr++, g_ac, g_p); auto level = FindMapByIndex(volnume, levnume); if (level != nullptr) - ChangeLevel(level, -1); + ChangeLevel(level, g_nextskill); break; } case concmd_myosx: diff --git a/source/games/sw/src/cheats.cpp b/source/games/sw/src/cheats.cpp index c2edfac6c..90a41e712 100644 --- a/source/games/sw/src/cheats.cpp +++ b/source/games/sw/src/cheats.cpp @@ -102,7 +102,7 @@ const char *GameInterface::GenericCheat(int player, int cheat) bool RestartCheat(cheatseq_t* c) { if (!checkCheat(c)) return false; - DeferredStartGame(currentLevel, -1); + DeferredStartGame(currentLevel, g_nextskill); return true; } @@ -117,7 +117,7 @@ bool NextCheat(cheatseq_t* c) if (!checkCheat(c)) return false; if (!currentLevel) return true; auto map = FindNextMap(currentLevel); - if (map) DeferredStartGame(map, -1); + if (map) DeferredStartGame(map, g_nextskill); return true; } @@ -126,7 +126,7 @@ bool PrevCheat(cheatseq_t* c) if (!checkCheat(c)) return false; if (!currentLevel) return true; auto map = FindMapByLevelNum(currentLevel->levelNumber - 1); - if (map) DeferredStartGame(map, -1); + if (map) DeferredStartGame(map, g_nextskill); return true; } @@ -160,7 +160,7 @@ bool WarpCheat(cheatseq_t* c) if (TEST(pp->Flags, PF_DEAD)) return true; - DeferredStartGame(maprec, -1); + DeferredStartGame(maprec, g_nextskill); return true; } diff --git a/source/games/sw/src/player.cpp b/source/games/sw/src/player.cpp index b68375439..0a4ee7215 100644 --- a/source/games/sw/src/player.cpp +++ b/source/games/sw/src/player.cpp @@ -7045,7 +7045,7 @@ void MultiPlayLimits(void) MapRecord *next = nullptr; next = FindNextMap(currentLevel); - ChangeLevel(next, -1); + ChangeLevel(next, g_nextskill); } } @@ -7206,7 +7206,7 @@ domovethings(void) { map = FindNextMap(currentLevel); } - ChangeLevel(map, -1); + ChangeLevel(map, g_nextskill); } } } diff --git a/source/games/sw/src/sector.cpp b/source/games/sw/src/sector.cpp index 5ac53e495..1a21ad049 100644 --- a/source/games/sw/src/sector.cpp +++ b/source/games/sw/src/sector.cpp @@ -1914,7 +1914,7 @@ OperateSprite(short SpriteNum, short player_is_operating) map = FindMapByLevelNum(sp->hitag); else map = FindNextMap(currentLevel); - ChangeLevel(map, -1); + ChangeLevel(map, g_nextskill); return true; } @@ -2096,7 +2096,7 @@ OperateTripTrigger(PLAYERp pp) map = FindMapByLevelNum(sectp->hitag); else map = FindNextMap(currentLevel); - ChangeLevel(map, -1); + ChangeLevel(map, g_nextskill); break; } diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index 34fe6e6ec..f9f344d28 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -5327,7 +5327,7 @@ ActorHealth(short SpriteNum, short amt) if (u->Health < u->MaxHealth/2) { FinishAnim = ANIM_SERP; - ChangeLevel(nullptr, -1); + ChangeLevel(nullptr, g_nextskill); return true; } }