summaryrefslogtreecommitdiff
path: root/src/koopatlas/pathmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/koopatlas/pathmanager.cpp')
-rw-r--r--src/koopatlas/pathmanager.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/koopatlas/pathmanager.cpp b/src/koopatlas/pathmanager.cpp
index 002b400..cf0bd05 100644
--- a/src/koopatlas/pathmanager.cpp
+++ b/src/koopatlas/pathmanager.cpp
@@ -29,11 +29,6 @@ void dWMPathManager_c::setup() {
levelStartWait = -1;
unlockPaths();
- if (!countdownToFadeIn)
- waitAtStart = 50;
- else
- waitAtStart = -1;
-
waitForAfterDeathAnim = -1;
mustPlayAfterDeathAnim = false;
if (LastPowerupStoreType == LOSE_LEVEL) {
@@ -112,7 +107,13 @@ void dWMPathManager_c::setup() {
mustComplainToMapCreator = true;
}
+ waitAtStart = -1;
} else {
+ if (!countdownToFadeIn)
+ waitAtStart = 50;
+ else
+ waitAtStart = -1;
+
SpammyReport("saved path node: %d\n", save->current_path_node);
if (save->current_path_node >= pathLayer->nodeCount) {
SpammyReport("out of bounds (%d), using node 0\n", pathLayer->nodeCount);
@@ -232,7 +233,6 @@ void dWMPathManager_c::unlockPaths() {
if (node->type == node->LEVEL && node->isUnlocked() && node->levelNumber[1] != 99) {
save->completions[node->levelNumber[0]-1][node->levelNumber[1]-1] |= COND_UNLOCKED;
- OSReport("beets: %d-%d\n", node->levelNumber[0], node->levelNumber[1]);
}
}
@@ -735,10 +735,12 @@ void dWMPathManager_c::moveThroughPath() {
if (visiblyChange && dWMHud_c::instance)
dWMHud_c::instance->showFooter();
- dScKoopatlas_c::instance->setBGMTrack(world->trackID);
+ dKPMusic::play(world->trackID);
} else if (to->worldID == 0) {
OSReport("No world\n");
+ save->currentMapMusic = 0;
+ dKPMusic::play(0);
save->newerWorldName[0] = 0;
if (dWMHud_c::instance)
dWMHud_c::instance->hideFooter();
@@ -765,6 +767,7 @@ void dWMPathManager_c::moveThroughPath() {
SpammyReport("Change to map ID %d (%s), entrance ID %d\n", save->current_world, to->destMap, to->foreignID);
+ dScKoopatlas_c::instance->keepMusicPlaying = true;
ActivateWipe(to->transition);
DoSceneChange(WORLD_MAP, 0x10000000 | (to->foreignID << 20), 0);
@@ -828,10 +831,7 @@ void dWMPathManager_c::activatePoint() {
levelStartWait = 40;
enteredLevel = dLevelInfo_c::s_info.searchBySlot(w, l);
- if (dScKoopatlas_c::instance->bgm.Exists()) {
- dScKoopatlas_c::instance->bgm.Stop(50);
- dScKoopatlas_c::instance->bgm.DetachSound();
- }
+ dKPMusic::stop();
}
}