From a11172fec441a39afc4ab91be03f98457d518170 Mon Sep 17 00:00:00 2001 From: FawazTakhji <56781705+FawazTakhji@users.noreply.github.com> Date: Sat, 10 Sep 2022 10:20:51 +0300 Subject: [PATCH 1/3] add delay slider to animation changer --- cheat-library/src/user/cheat/visuals/AnimationChanger.cpp | 7 ++++--- cheat-library/src/user/cheat/visuals/AnimationChanger.h | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cheat-library/src/user/cheat/visuals/AnimationChanger.cpp b/cheat-library/src/user/cheat/visuals/AnimationChanger.cpp index 3292878..50bffea 100644 --- a/cheat-library/src/user/cheat/visuals/AnimationChanger.cpp +++ b/cheat-library/src/user/cheat/visuals/AnimationChanger.cpp @@ -234,7 +234,8 @@ namespace cheat::feature NF(f_Enabled, "Animation Changer", "Visuals::AnimationChanger", false), NF(f_Animation, "Animation", "Visuals::AnimationChanger", "ExtraAttack"), NF(f_ApplyKey, "Apply Animation", "Visuals::AnimationChanger", Hotkey('Y')), - NF(f_ResetKey, "Reset Animation", "Visuals::AnimationChanger", Hotkey('R')) + NF(f_ResetKey, "Reset Animation", "Visuals::AnimationChanger", Hotkey('R')), + NF(f_Delay, "Repeat Delay", "Visuals::AnimationChanger", 400) { events::GameUpdateEvent += MY_METHOD_HANDLER(AnimationChanger::OnGameUpdate); } @@ -268,6 +269,7 @@ namespace cheat::feature ConfigWidget("Apply Key", f_ApplyKey, true); ConfigWidget("Reset Key", f_ResetKey, true); + ConfigWidget("Delay", f_Delay, 0.01f, 1.0f, 1000000000.0f, "Delay to repeat animation"); } } ImGui::EndGroupPanel(); @@ -294,8 +296,7 @@ namespace cheat::feature if (!f_Enabled) return; - // Taiga#5555: Maybe need to add separate option to change delay value if user feels like it's too fast or slow. - UPDATE_DELAY(400); + UPDATE_DELAY(f_Delay); auto& manager = game::EntityManager::instance(); auto avatar = manager.avatar(); diff --git a/cheat-library/src/user/cheat/visuals/AnimationChanger.h b/cheat-library/src/user/cheat/visuals/AnimationChanger.h index b8f9d0c..586df55 100644 --- a/cheat-library/src/user/cheat/visuals/AnimationChanger.h +++ b/cheat-library/src/user/cheat/visuals/AnimationChanger.h @@ -12,6 +12,7 @@ namespace cheat::feature config::Field f_Animation; config::Field f_ApplyKey; config::Field f_ResetKey; + config::Field f_Delay; const FeatureGUIInfo& GetGUIInfo() const override; void DrawMain() override; From 97bdb137ece5fdaf9f6ebc6634df381349940774 Mon Sep 17 00:00:00 2001 From: FawazTakhji <56781705+FawazTakhji@users.noreply.github.com> Date: Sat, 10 Sep 2022 10:29:03 +0300 Subject: [PATCH 2/3] Update AnimationChanger.cpp --- cheat-library/src/user/cheat/visuals/AnimationChanger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheat-library/src/user/cheat/visuals/AnimationChanger.cpp b/cheat-library/src/user/cheat/visuals/AnimationChanger.cpp index 50bffea..98cb1fe 100644 --- a/cheat-library/src/user/cheat/visuals/AnimationChanger.cpp +++ b/cheat-library/src/user/cheat/visuals/AnimationChanger.cpp @@ -269,7 +269,7 @@ namespace cheat::feature ConfigWidget("Apply Key", f_ApplyKey, true); ConfigWidget("Reset Key", f_ResetKey, true); - ConfigWidget("Delay", f_Delay, 0.01f, 1.0f, 1000000000.0f, "Delay to repeat animation"); + ConfigWidget("Delay", f_Delay, 1.0f, 1.0f, 1000000000.0f, "Delay to repeat animation"); } } ImGui::EndGroupPanel(); From ce0f7e4597d79fb489abaea8f4d68921cd432284 Mon Sep 17 00:00:00 2001 From: Joaquin <67109235+Taiga74164@users.noreply.github.com> Date: Sat, 10 Sep 2022 01:50:39 -0600 Subject: [PATCH 3/3] Fix wrong type not much of big dealy really --- cheat-library/src/user/cheat/visuals/AnimationChanger.cpp | 2 +- cheat-library/src/user/cheat/visuals/AnimationChanger.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cheat-library/src/user/cheat/visuals/AnimationChanger.cpp b/cheat-library/src/user/cheat/visuals/AnimationChanger.cpp index 98cb1fe..a6e3e8c 100644 --- a/cheat-library/src/user/cheat/visuals/AnimationChanger.cpp +++ b/cheat-library/src/user/cheat/visuals/AnimationChanger.cpp @@ -269,7 +269,7 @@ namespace cheat::feature ConfigWidget("Apply Key", f_ApplyKey, true); ConfigWidget("Reset Key", f_ResetKey, true); - ConfigWidget("Delay", f_Delay, 1.0f, 1.0f, 1000000000.0f, "Delay to repeat animation"); + ConfigWidget("Delay", f_Delay, 1, 1, 1000000000, "Delay to repeat animation"); } } ImGui::EndGroupPanel(); diff --git a/cheat-library/src/user/cheat/visuals/AnimationChanger.h b/cheat-library/src/user/cheat/visuals/AnimationChanger.h index 586df55..4a7ecaa 100644 --- a/cheat-library/src/user/cheat/visuals/AnimationChanger.h +++ b/cheat-library/src/user/cheat/visuals/AnimationChanger.h @@ -12,7 +12,7 @@ namespace cheat::feature config::Field f_Animation; config::Field f_ApplyKey; config::Field f_ResetKey; - config::Field f_Delay; + config::Field f_Delay; const FeatureGUIInfo& GetGUIInfo() const override; void DrawMain() override;