Added delay with SetCollider to avoid FPS drop, Changed invalid checksum message

Since people are still downloading the wrong version. Hopefully this will help them understand
This commit is contained in:
Joaquin
2022-09-06 00:48:48 -06:00
parent a010cfb8ac
commit e467bb596c
2 changed files with 6 additions and 2 deletions

View File

@ -145,13 +145,13 @@ bool IsStaticCheckSumValid()
if (!scanner.IsValidModuleHash(moduleName, checksumData)) if (!scanner.IsValidModuleHash(moduleName, checksumData))
{ {
LOG_WARNING("Seems like assembly checksum don't match with version %s. It's normal only if you using Chinese version of genshin impact.", version.c_str()); LOG_WARNING("Seems like assembly checksum don't match with version %s. Either your game isn't updated or you downloaded the wrong version of Akebi", version.c_str());
system("pause");
return false; return false;
} }
checksumTimestamps.value()[moduleName] = scanner.GetModuleTimestamp(moduleName); checksumTimestamps.value()[moduleName] = scanner.GetModuleTimestamp(moduleName);
} }
//std::system("pause");
checksumTimestamps.FireChanged(); checksumTimestamps.FireChanged();
return true; return true;

View File

@ -148,6 +148,8 @@ namespace cheat::feature
// Taiga#5555: There might be an in-game function for this already I'm just not sure which one // Taiga#5555: There might be an in-game function for this already I'm just not sure which one
void SetMonsterCollider(bool v) void SetMonsterCollider(bool v)
{ {
UPDATE_DELAY(300);
auto monsterRoot = app::GameObject_Find(string_to_il2cppi("/EntityRoot/MonsterRoot"), nullptr); auto monsterRoot = app::GameObject_Find(string_to_il2cppi("/EntityRoot/MonsterRoot"), nullptr);
if (monsterRoot != nullptr) if (monsterRoot != nullptr)
{ {
@ -160,6 +162,8 @@ namespace cheat::feature
auto monsterTransform = app::GameObject_GetComponentByName(monsterGameObject, string_to_il2cppi("Transform"), nullptr); auto monsterTransform = app::GameObject_GetComponentByName(monsterGameObject, string_to_il2cppi("Transform"), nullptr);
auto transformChild = app::Transform_GetChild(reinterpret_cast<app::Transform*>(monsterTransform), 1, nullptr); auto transformChild = app::Transform_GetChild(reinterpret_cast<app::Transform*>(monsterTransform), 1, nullptr);
auto colliderGameObject = app::Component_1_get_gameObject(reinterpret_cast<app::Component_1*>(transformChild), nullptr); auto colliderGameObject = app::Component_1_get_gameObject(reinterpret_cast<app::Component_1*>(transformChild), nullptr);
if (app::GameObject_get_active(colliderGameObject, nullptr) == v)
continue;
app::GameObject_SetActive(colliderGameObject, v, nullptr); app::GameObject_SetActive(colliderGameObject, v, nullptr);
} }
} }