From 2e825f7e705d4e81c548fe68edc7fb42b73c9b57 Mon Sep 17 00:00:00 2001 From: TobyAdd <66429886+TobyAdd@users.noreply.github.com> Date: Wed, 27 Nov 2024 23:00:46 +0200 Subject: [PATCH] speedhack added --- src/hooks.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/hooks.cpp b/src/hooks.cpp index d886dc5..10f8962 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -62,6 +63,17 @@ void switchStartPos(int incBy, bool direction = true) { } } +class $modify(cocos2d::CCScheduler) { + void update(float dt) { + auto &config = Config::get(); + + if (config.get("speedhack_enabled", false)) + dt *= config.get("speedhack_value", 1.f); + + return CCScheduler::update(dt); + } +}; + class $modify(PlayLayer) { struct Fields { GameObject* anticheat_obj = nullptr;