diff options
-rw-r--r-- | src/koopatlas/pathmanager.cpp | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/src/koopatlas/pathmanager.cpp b/src/koopatlas/pathmanager.cpp index 896707a..97d9265 100644 --- a/src/koopatlas/pathmanager.cpp +++ b/src/koopatlas/pathmanager.cpp @@ -597,22 +597,26 @@ 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) { - 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]; - } + if (strncmp(save->newerWorldName, world->name, 36) == 0) { + OSReport("Already here\n"); + } else { + 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; + save->hudHintH = world->hudHintH; + save->hudHintS = world->hudHintS; + save->hudHintL = world->hudHintL; - dWMHud_c::instance->hideAndShowFooter(); + dWMHud_c::instance->hideAndShowFooter(); + } } else { OSReport("Not found!\n"); } |