More Mweep (#4192)

* More Mweep

Adjusted the "King Zora Speed" timesaver enhancement to allow for slowing the animation down.

* [Fixed] Crashing when applying preset settings

Adjusted presets.h to expect a float instead of an integer for the "MweepSpeed" timesaver enhancement setting.

* Cleaning some things up

Deleted an unnecessary line, and switched the "King Zora Speed" option back to multiplier display instead of a percentage.

* Update SohMenuBar.cpp

Switched back to multiplier display

---------

Co-authored-by: Malkierian <malkierian@gmail.com>
This commit is contained in:
Yomitht 2024-10-14 17:01:18 -06:00 committed by GitHub
parent 3daf7a2ee5
commit 86ad99f3c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 8 deletions

View File

@ -562,7 +562,7 @@ const std::vector<PresetEntry> vanillaPlusPresetEntries = {
// Skip Text // Skip Text
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipText"), 1), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipText"), 1),
// King Zora Speed (1 to 5) // King Zora Speed (1 to 5)
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MweepSpeed"), 2), PRESET_ENTRY_FLOAT(CVAR_ENHANCEMENT("MweepSpeed"), 2.0f),
// Faster Block Push (+0 to +5) // Faster Block Push (+0 to +5)
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterBlockPush"), 5), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterBlockPush"), 5),
// Better Owl // Better Owl
@ -633,7 +633,7 @@ const std::vector<PresetEntry> enhancedPresetEntries = {
// Skip Text // Skip Text
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipText"), 1), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipText"), 1),
// King Zora Speed (1 to 5) // King Zora Speed (1 to 5)
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MweepSpeed"), 5), PRESET_ENTRY_FLOAT(CVAR_ENHANCEMENT("MweepSpeed"), 5.0f),
// Faster Block Push (+0 to +5) // Faster Block Push (+0 to +5)
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterBlockPush"), 5), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterBlockPush"), 5),
// Better Owl // Better Owl
@ -765,7 +765,7 @@ const std::vector<PresetEntry> randomizerPresetEntries = {
// Skip Text // Skip Text
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipText"), 1), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipText"), 1),
// King Zora Speed (1 to 5) // King Zora Speed (1 to 5)
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MweepSpeed"), 5), PRESET_ENTRY_FLOAT(CVAR_ENHANCEMENT("MweepSpeed"), 5.0f),
// Faster Block Push (+0 to +5) // Faster Block Push (+0 to +5)
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterBlockPush"), 5), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterBlockPush"), 5),
// Better Owl // Better Owl
@ -914,7 +914,7 @@ const std::vector<PresetEntry> randomizerPresetEntries = {
const std::vector<PresetEntry> spockRacePresetEntries = { const std::vector<PresetEntry> spockRacePresetEntries = {
PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("LogicRules"), 0), PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("LogicRules"), 0),
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TextSpeed"), 5), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TextSpeed"), 5),
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MweepSpeed"), 5), PRESET_ENTRY_FLOAT(CVAR_ENHANCEMENT("MweepSpeed"), 5.0f),
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ClimbSpeed"), 4), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ClimbSpeed"), 4),
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterBlockPush"), 5), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterBlockPush"), 5),
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterHeavyBlockLift"), 1), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterHeavyBlockLift"), 1),
@ -1034,7 +1034,7 @@ const std::vector<PresetEntry> spockRaceNoLogicPresetEntries = {
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MMBunnyHood"), BUNNY_HOOD_FAST), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MMBunnyHood"), BUNNY_HOOD_FAST),
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MarketSneak"), 1), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MarketSneak"), 1),
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MaskSelect"), 1), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MaskSelect"), 1),
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MweepSpeed"), 5), PRESET_ENTRY_FLOAT(CVAR_ENHANCEMENT("MweepSpeed"), 5.0f),
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NoForcedNavi"), 1), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NoForcedNavi"), 1),
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NoInputForCredits"), 1), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NoInputForCredits"), 1),
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("PauseAnyCursor"), 1), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("PauseAnyCursor"), 1),

View File

@ -667,7 +667,7 @@ void DrawEnhancementsMenu() {
UIWidgets::PaddedEnhancementSliderInt("Text Speed: %dx", "##TEXTSPEED", CVAR_ENHANCEMENT("TextSpeed"), 1, 5, "", 1, true, false, true); UIWidgets::PaddedEnhancementSliderInt("Text Speed: %dx", "##TEXTSPEED", CVAR_ENHANCEMENT("TextSpeed"), 1, 5, "", 1, true, false, true);
UIWidgets::PaddedEnhancementCheckbox("Skip Text", CVAR_ENHANCEMENT("SkipText"), false, true); UIWidgets::PaddedEnhancementCheckbox("Skip Text", CVAR_ENHANCEMENT("SkipText"), false, true);
UIWidgets::Tooltip("Holding down B skips text"); UIWidgets::Tooltip("Holding down B skips text");
UIWidgets::PaddedEnhancementSliderInt("King Zora Speed: %dx", "##MWEEPSPEED", CVAR_ENHANCEMENT("MweepSpeed"), 1, 5, "", 1, true, false, true); UIWidgets::PaddedEnhancementSliderFloat("King Zora Speed: %.2fx", "##MWEEPSPEED", CVAR_ENHANCEMENT("MweepSpeed"), 0.1f, 5.0f, "", 1.0f, false, false, true);
UIWidgets::PaddedEnhancementSliderInt("Vine/Ladder Climb speed +%d", "##CLIMBSPEED", CVAR_ENHANCEMENT("ClimbSpeed"), 0, 12, "", 0, true, false, true); UIWidgets::PaddedEnhancementSliderInt("Vine/Ladder Climb speed +%d", "##CLIMBSPEED", CVAR_ENHANCEMENT("ClimbSpeed"), 0, 12, "", 0, true, false, true);
UIWidgets::PaddedEnhancementSliderInt("Block pushing speed +%d", "##BLOCKSPEED", CVAR_ENHANCEMENT("FasterBlockPush"), 0, 5, "", 0, true, false, true); UIWidgets::PaddedEnhancementSliderInt("Block pushing speed +%d", "##BLOCKSPEED", CVAR_ENHANCEMENT("FasterBlockPush"), 0, 5, "", 0, true, false, true);
UIWidgets::PaddedEnhancementSliderInt("Crawl speed %dx", "##CRAWLSPEED", CVAR_ENHANCEMENT("CrawlSpeed"), 1, 4, "", 1, true, false, true); UIWidgets::PaddedEnhancementSliderInt("Crawl speed %dx", "##CRAWLSPEED", CVAR_ENHANCEMENT("CrawlSpeed"), 1, 4, "", 1, true, false, true);

View File

@ -350,7 +350,7 @@ s32 EnKz_FollowPath(EnKz* this, PlayState* play) {
pathDiffZ = pointPos->z - this->actor.world.pos.z; 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); Math_SmoothStepToS(&this->actor.world.rot.y, (Math_FAtan2F(pathDiffX, pathDiffZ) * (0x8000 / M_PI)), 0xA, 0x3E8, 1);
if ((SQ(pathDiffX) + SQ(pathDiffZ)) < 10.0f * CVarGetInteger(CVAR_ENHANCEMENT("MweepSpeed"), 1)) { if ((SQ(pathDiffX) + SQ(pathDiffZ)) < 10.0f * CVarGetFloat(CVAR_ENHANCEMENT("MweepSpeed"), 1.0f)) {
this->waypoint++; this->waypoint++;
if (this->waypoint >= path->count) { if (this->waypoint >= path->count) {
this->waypoint = 0; this->waypoint = 0;
@ -445,7 +445,7 @@ void EnKz_SetupMweep(EnKz* this, PlayState* play) {
initPos.z += 260.0f; initPos.z += 260.0f;
Play_CameraSetAtEye(play, this->cutsceneCamera, &pos, &initPos); Play_CameraSetAtEye(play, this->cutsceneCamera, &pos, &initPos);
Player_SetCsActionWithHaltedActors(play, &this->actor, 8); Player_SetCsActionWithHaltedActors(play, &this->actor, 8);
this->actor.speedXZ = 0.1f * CVarGetInteger(CVAR_ENHANCEMENT("MweepSpeed"), 1); this->actor.speedXZ = 0.1f * CVarGetFloat(CVAR_ENHANCEMENT("MweepSpeed"), 1.0f);
this->actionFunc = EnKz_Mweep; this->actionFunc = EnKz_Mweep;
} }