mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-10-31 15:45:06 -04:00
Adds a slider that lets players multiply King Zora's speed by up to 5x.
This commit is contained in:
parent
eea5135d62
commit
6153ea72eb
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user