Prevent loading checkpoints in the wrong level

This commit is contained in:
Kiloku
2025-01-03 16:47:07 -03:00
committed by Lywx
parent 9506a4297b
commit eb44ba0f04
3 changed files with 22 additions and 2 deletions
+1 -1
View File
@@ -4678,7 +4678,7 @@ void Player_Setup(Player* playerx) {
gDisplayedHitCount = gHitCount;
D_hud_80161730 = 0;
if (CVarGetInteger("gCheckpoint.Set", 0)) {
if (CVarGetInteger("gCheckpoint.Set", 0) && CVarGetInteger("gCheckpoint.gSavedLevel", -1) == gCurrentLevel) {
gSavedGroundSurface = CVarGetInteger("gCheckpoint.gSavedGroundSurface", gSavedGroundSurface);
gSavedPathProgress = CVarGetFloat("gCheckpoint.gSavedPathProgress", gSavedPathProgress);
gSavedObjectLoadIndex = CVarGetInteger("gCheckpoint.gSavedObjectLoadIndex", gSavedObjectLoadIndex);