From cb7cc05946dc0b43066f479e42afdcf03895655c Mon Sep 17 00:00:00 2001 From: Treeki Date: Sun, 12 May 2013 22:52:46 +0200 Subject: fixed a couple of completion message bugs --- src/koopatlas/pathmanager.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/koopatlas') 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); } -- cgit v1.2.3