diff --git a/cheat-library/src/appdata/il2cpp-functions.h b/cheat-library/src/appdata/il2cpp-functions.h index d3f5a9a..b40a760 100644 --- a/cheat-library/src/appdata/il2cpp-functions.h +++ b/cheat-library/src/appdata/il2cpp-functions.h @@ -346,6 +346,7 @@ DO_APP_FUNC(0x0579EB00, int32_t, Screen_get_height, (MethodInfo* method)); DO_APP_FUNC(0x05822EE0, void, Animator_Play, (Animator* __this, String* stateName, int32_t layer, float normalizedTime, MethodInfo* method)); DO_APP_FUNC(0x05823060, void, Animator_Rebind, (Animator* __this, MethodInfo* method)); +DO_APP_FUNC(0x058235C0, float, Animator_get_speed, (Animator* __this, MethodInfo* method)); DO_APP_FUNC(0x058236F0, void, Animator_set_speed, (Animator* __this, float value, MethodInfo* method)); DO_APP_FUNC(0x058AE2D0, bool, Behaviour_get_isActiveAndEnabled, (Behaviour* __this, MethodInfo* method)); diff --git a/cheat-library/src/user/cheat/world/FreezeEnemies.cpp b/cheat-library/src/user/cheat/world/FreezeEnemies.cpp index a9d8bed..5b6ca72 100644 --- a/cheat-library/src/user/cheat/world/FreezeEnemies.cpp +++ b/cheat-library/src/user/cheat/world/FreezeEnemies.cpp @@ -9,6 +9,7 @@ namespace cheat::feature { + static bool change = false; FreezeEnemies::FreezeEnemies() : Feature(), NF(f_Enabled, "Freeze Enemies", "FreezeEnemies", false) @@ -61,11 +62,16 @@ namespace cheat::feature //LOG_DEBUG("%s", magic_enum::enum_name(constraints).data()); app::Rigidbody_set_constraints(rigidBody, app::RigidbodyConstraints__Enum::FreezeAll, nullptr); app::Animator_set_speed(animator, 0.f, nullptr); + change = false; } else { app::Rigidbody_set_constraints(rigidBody, app::RigidbodyConstraints__Enum::FreezeRotation, nullptr); - app::Animator_set_speed(animator, 1.f, nullptr); + if (!change) + { + app::Animator_set_speed(animator, 1.f, nullptr); + change = true; + } } } }