Fixed enemies not freezing(elemental reaction)
This commit is contained in:
parent
69fdabafc5
commit
be2546903a
@ -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);
|
||||
if (!change)
|
||||
{
|
||||
app::Animator_set_speed(animator, 1.f, nullptr);
|
||||
change = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user