diff options
Diffstat (limited to '')
-rw-r--r-- | src/koopatlas/pathmanager.cpp | 47 |
1 files changed, 26 insertions, 21 deletions
diff --git a/src/koopatlas/pathmanager.cpp b/src/koopatlas/pathmanager.cpp index abcfd76..6b28d66 100644 --- a/src/koopatlas/pathmanager.cpp +++ b/src/koopatlas/pathmanager.cpp @@ -657,31 +657,36 @@ void dWMPathManager_c::moveThroughPath() { OSReport("Activating world change %d\n", to->worldID); const dKPWorldDef_s *world = dScKoopatlas_c::instance->mapData.findWorldDef(to->worldID); if (world) { + bool visiblyChange = false; if (strncmp(save->newerWorldName, world->name, 32) == 0) { - OSReport("Already here\n"); - } else { - OSReport("Found!\n"); - strncpy(save->newerWorldName, world->name, 32); - save->newerWorldName[31] = 0; - save->newerWorldID = world->worldID; - save->currentMapMusic = world->trackID; - - for (int i = 0; i < 2; i++) { - save->fsTextColours[i] = world->fsTextColours[i]; - save->fsHintColours[i] = world->fsHintColours[i]; - save->hudTextColours[i] = world->hudTextColours[i]; - } - - save->hudHintH = world->hudHintH; - save->hudHintS = world->hudHintS; - save->hudHintL = world->hudHintL; + OSReport("Already here, but setting BGM track\n"); + visiblyChange = true; + } - save->titleScreenWorld = world->titleScreenWorld; - save->titleScreenLevel = world->titleScreenLevel; + OSReport("Found!\n"); + strncpy(save->newerWorldName, world->name, 32); + save->newerWorldName[31] = 0; + save->newerWorldID = world->worldID; + save->currentMapMusic = world->trackID; - if (dWMHud_c::instance) - dWMHud_c::instance->showFooter(); + for (int i = 0; i < 2; i++) { + save->fsTextColours[i] = world->fsTextColours[i]; + save->fsHintColours[i] = world->fsHintColours[i]; + save->hudTextColours[i] = world->hudTextColours[i]; } + + save->hudHintH = world->hudHintH; + save->hudHintS = world->hudHintS; + save->hudHintL = world->hudHintL; + + save->titleScreenWorld = world->titleScreenWorld; + save->titleScreenLevel = world->titleScreenLevel; + + if (visiblyChange && dWMHud_c::instance) + dWMHud_c::instance->showFooter(); + + dScKoopatlas_c::instance->setBGMTrack(world->trackID); + } else if (to->worldID == 0) { OSReport("No world\n"); save->newerWorldName[0] = 0; |