summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/koopatlas/pathmanager.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/koopatlas/pathmanager.cpp b/src/koopatlas/pathmanager.cpp
index 4651b3e..b1108b8 100644
--- a/src/koopatlas/pathmanager.cpp
+++ b/src/koopatlas/pathmanager.cpp
@@ -316,6 +316,9 @@ dWMPathManager_c::~dWMPathManager_c() {
}
}
+ LastLevelPlayed[0] = enteredLevel->worldSlot;
+ LastLevelPlayed[1] = enteredLevel->levelSlot;
+
// Now, a fuckton of checks for the various possible things we can finish!
dLevelInfo_c *li = &dLevelInfo_c::s_info;
u32 theseConds = save->GetLevelCondition(enteredLevel->worldSlot, enteredLevel->levelSlot);
@@ -385,14 +388,16 @@ dWMPathManager_c::~dWMPathManager_c() {
}
}
- // So.. are we candidates for any of these?
- LastLevelPlayed[0] = enteredLevel->worldSlot;
- LastLevelPlayed[1] = enteredLevel->levelSlot;
+ // I'm using gotos. SUE ME.
+ // Anyhow, don't consider non-levels for this.
+ if (!(enteredLevel->flags & 2))
+ goto cannotFinishAnything;
+ // So.. are we candidates for any of these?
int everythingFlag = 0, gEverythingFlag = 0;
if (coinCount == totalCoinCount)
everythingFlag |= 1;
- if (exitCount == globalExitCount)
+ if (exitCount == totalExitCount)
everythingFlag |= 2;
if (globalCoinCount == totalGlobalCoinCount)
gEverythingFlag |= 1;
@@ -444,6 +449,7 @@ dWMPathManager_c::~dWMPathManager_c() {
CanFinishEverything = true;
}
+cannotFinishAnything:
if (penguinSlideSound.Exists())
penguinSlideSound.Stop(5);
}