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.cpp32
1 files changed, 30 insertions, 2 deletions
diff --git a/src/koopatlas/pathmanager.cpp b/src/koopatlas/pathmanager.cpp
index e42246e..2401e04 100644
--- a/src/koopatlas/pathmanager.cpp
+++ b/src/koopatlas/pathmanager.cpp
@@ -573,8 +573,8 @@ void dWMPathManager_c::moveThroughPath() {
if (to->type == dKPNode_s::LEVEL) {
// Always stop on levels
reallyStop = true;
- } else if (to->type == dKPNode_s::CHANGE) {
- // Never stop on entrances
+ } else if (to->type == dKPNode_s::CHANGE || to->type == dKPNode_s::WORLD_CHANGE) {
+ // Never stop on entrances or on world changes
reallyStop = false;
} else if (to->type == dKPNode_s::PASS_THROUGH) {
// If there's only one exit here, then stop even though
@@ -590,6 +590,34 @@ void dWMPathManager_c::moveThroughPath() {
reallyStop = true;
}
+ if (to->type == dKPNode_s::WORLD_CHANGE) {
+ // Set the current world info
+ SaveBlock *save = GetSaveFile()->GetBlock(-1);
+
+ OSReport("Activating world change %d\n", to->worldID);
+ dKPWorldDef_s *world = dScKoopatlas_c::instance->mapData.findWorldDef(to->worldID);
+ if (world) {
+ OSReport("Found!\n");
+ strncpy(save->newerWorldName, world->name, 36);
+ save->newerWorldName[35] = 0;
+ 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;
+
+ dWMHud_c::instance->hideAndShowFooter();
+ } else {
+ OSReport("Not found!\n");
+ }
+ }
+
if (to->type == dKPNode_s::CHANGE) {
// Go to another map