diff --git a/DevourClient/Features/Misc/Misc.cpp b/DevourClient/Features/Misc/Misc.cpp index f189237..3a4fe16 100644 --- a/DevourClient/Features/Misc/Misc.cpp +++ b/DevourClient/Features/Misc/Misc.cpp @@ -784,3 +784,42 @@ void Misc::Jumpscare(bool inHidingSpot) { } } } + +void Misc::FreezeAzazel() { + if (Helpers::GetActiveScene() == std::string("Menu")) { + return; + } + + float azazelTimeScale = 1; + + Unity::il2cppArray* Azazel = Unity::GameObject::FindWithTag("Azazel"); + + for (int j = 0; j < Azazel->m_uMaxLength + 1; j++) + { + if (!Azazel->operator[](j)) { + return; + } + + Unity::CGameObject* AzazelObj = Azazel->operator[](j)->GetMemberValue("gameObject"); + + if (!AzazelObj) { + return; + } + + Unity::CComponent* AzazelComp = AzazelObj->GetComponent("Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion"); + + if (AzazelComp != NULL) { + float currentAzazelTimeScale = AzazelComp->GetMemberValue("TimeScale"); + + if (currentAzazelTimeScale == azazelTimeScale) { + AzazelComp->SetMemberValue("TimeScale", 0); + } + else { + AzazelComp->SetMemberValue("TimeScale", azazelTimeScale); + } + } + else { + return; + } + } +}