Fixed enemies not freezing(elemental reaction)

This commit is contained in:
Joaquin 2022-08-01 00:29:35 -06:00
parent 69fdabafc5
commit be2546903a

View File

@ -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;
}
}
}
}