Add option to prevent speed modifier from affecting jump velocity (#2874)

This commit is contained in:
Garrett Cox 2023-06-15 03:25:48 +00:00 committed by GitHub
parent 170c8ce16e
commit f85b04336c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -314,6 +314,7 @@ namespace GameControlEditor {
UIWidgets::Spacer(5); UIWidgets::Spacer(5);
window->BeginGroupPanelPublic("Walk Modifier", ImGui::GetContentRegionAvail()); window->BeginGroupPanelPublic("Walk Modifier", ImGui::GetContentRegionAvail());
UIWidgets::PaddedEnhancementCheckbox("Toggle modifier instead of holding", "gWalkSpeedToggle", true, false); UIWidgets::PaddedEnhancementCheckbox("Toggle modifier instead of holding", "gWalkSpeedToggle", true, false);
UIWidgets::PaddedEnhancementCheckbox("Don't affect jump distance/velocity", "gWalkModifierDoesntChangeJump", true, false);
UIWidgets::PaddedEnhancementSliderFloat("Modifier 1: %d %%", "##WalkMod1", "gWalkModifierOne", 0.0f, 5.0f, "", 1.0f, true, true, false, true); UIWidgets::PaddedEnhancementSliderFloat("Modifier 1: %d %%", "##WalkMod1", "gWalkModifierOne", 0.0f, 5.0f, "", 1.0f, true, true, false, true);
UIWidgets::PaddedEnhancementSliderFloat("Modifier 2: %d %%", "##WalkMod2", "gWalkModifierTwo", 0.0f, 5.0f, "", 1.0f, true, true, false, true); UIWidgets::PaddedEnhancementSliderFloat("Modifier 2: %d %%", "##WalkMod2", "gWalkModifierTwo", 0.0f, 5.0f, "", 1.0f, true, true, false, true);
window->EndGroupPanelPublic(0); window->EndGroupPanelPublic(0);

View File

@ -6124,7 +6124,7 @@ void func_8083DFE0(Player* this, f32* arg1, s16* arg2) {
maxSpeed *= 1.5f; maxSpeed *= 1.5f;
} }
if (CVarGetInteger("gEnableWalkModify", 0)) { if (CVarGetInteger("gEnableWalkModify", 0) && !CVarGetInteger("gWalkModifierDoesntChangeJump", 0)) {
if (CVarGetInteger("gWalkSpeedToggle", 0)) { if (CVarGetInteger("gWalkSpeedToggle", 0)) {
if (gWalkSpeedToggle1) { if (gWalkSpeedToggle1) {
maxSpeed *= CVarGetFloat("gWalkModifierOne", 1.0f); maxSpeed *= CVarGetFloat("gWalkModifierOne", 1.0f);