diff --git a/libultraship/libultraship/GameSettings.cpp b/libultraship/libultraship/GameSettings.cpp index 244e1a394..e7e995389 100644 --- a/libultraship/libultraship/GameSettings.cpp +++ b/libultraship/libultraship/GameSettings.cpp @@ -59,6 +59,9 @@ namespace Game { Settings.enhancements.text_speed = Ship::stoi(Conf[EnhancementSection]["text_speed"]); CVar_SetS32("gTextSpeed", Settings.enhancements.text_speed); + Settings.enhancements.mweep_speed = Ship::stoi(Conf[EnhancementSection]["mweep_speed"]); + CVar_SetS32("gMweepSpeed", Settings.enhancements.mweep_speed); + Settings.enhancements.disable_lod = stob(Conf[EnhancementSection]["disable_lod"]); CVar_SetS32("gDisableLOD", Settings.enhancements.disable_lod); @@ -279,6 +282,7 @@ namespace Game { // Enhancements Conf[EnhancementSection]["skip_text"] = std::to_string(Settings.enhancements.skip_text); Conf[EnhancementSection]["text_speed"] = std::to_string(Settings.enhancements.text_speed); + Conf[EnhancementSection]["mweep_speed"] = std::to_string(Settings.enhancements.mweep_speed); Conf[EnhancementSection]["disable_lod"] = std::to_string(Settings.enhancements.disable_lod); Conf[EnhancementSection]["animated_pause_menu"] = std::to_string(Settings.enhancements.animated_pause_menu); Conf[EnhancementSection]["dynamic_wallet_icon"] = std::to_string(Settings.enhancements.dynamic_wallet_icon); diff --git a/libultraship/libultraship/GameSettings.h b/libultraship/libultraship/GameSettings.h index 2feea8dcb..d07cc69ec 100644 --- a/libultraship/libultraship/GameSettings.h +++ b/libultraship/libultraship/GameSettings.h @@ -21,6 +21,7 @@ struct SoHConfigType { // Enhancements struct { int text_speed = 1; + int mweep_speed = 1; bool skip_text = false; bool disable_lod = false; bool animated_pause_menu = false; diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 5111a0d6d..d521aaa1c 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -483,6 +483,12 @@ namespace SohImGui { needs_save = true; } + ImGui::Text("King Zora Speed: %dx", Game::Settings.enhancements.mweep_speed); + if (ImGui::SliderInt("##MWEEPSPEED", &Game::Settings.enhancements.mweep_speed, 1, 5, "")) { + CVar_SetS32("gMweepSpeed", Game::Settings.enhancements.mweep_speed); + needs_save = true; + } + if (ImGui::Checkbox("Skip Text", &Game::Settings.enhancements.skip_text)) { CVar_SetS32("gSkipText", Game::Settings.enhancements.skip_text); needs_save = true; diff --git a/soh/src/overlays/actors/ovl_En_Kz/z_en_kz.c b/soh/src/overlays/actors/ovl_En_Kz/z_en_kz.c index 1161ba5e3..502f2c056 100644 --- a/soh/src/overlays/actors/ovl_En_Kz/z_en_kz.c +++ b/soh/src/overlays/actors/ovl_En_Kz/z_en_kz.c @@ -287,7 +287,7 @@ s32 EnKz_FollowPath(EnKz* this, GlobalContext* globalCtx) { pathDiffZ = pointPos->z - this->actor.world.pos.z; Math_SmoothStepToS(&this->actor.world.rot.y, (Math_FAtan2F(pathDiffX, pathDiffZ) * (0x8000 / M_PI)), 0xA, 0x3E8, 1); - if ((SQ(pathDiffX) + SQ(pathDiffZ)) < 10.0f) { + if ((SQ(pathDiffX) + SQ(pathDiffZ)) < 10.0f * CVar_GetS32("gMweepSpeed", 1)) { this->waypoint++; if (this->waypoint >= path->count) { this->waypoint = 0; @@ -378,7 +378,7 @@ void EnKz_SetupMweep(EnKz* this, GlobalContext* globalCtx) { initPos.z += 260.0f; Gameplay_CameraSetAtEye(globalCtx, this->cutsceneCamera, &pos, &initPos); func_8002DF54(globalCtx, &this->actor, 8); - this->actor.speedXZ = 0.1f; + this->actor.speedXZ = 0.1f * CVar_GetS32("gMweepSpeed", 1); this->actionFunc = EnKz_Mweep; }