From 03fdc4a3b383ff5ca8a18c639d9e019fc19efb72 Mon Sep 17 00:00:00 2001 From: Disquse Date: Wed, 6 Dec 2023 12:01:28 +0300 Subject: [PATCH] tweak(onesync): use event names in `NetEventError` Instead of using vtable names and rely on RTTI (which doesn't exist in RDR3 and newest GTA5 builds). --- code/components/gta-net-five/src/CloneExperiments.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/code/components/gta-net-five/src/CloneExperiments.cpp b/code/components/gta-net-five/src/CloneExperiments.cpp index 6a77692594..cc09cae806 100644 --- a/code/components/gta-net-five/src/CloneExperiments.cpp +++ b/code/components/gta-net-five/src/CloneExperiments.cpp @@ -3315,8 +3315,6 @@ static void SendAlterWantedLevelEvent2Hook(void* a1, void* a2, void* a3, void* a } #endif -std::string GetType(void* d); - static void NetEventError() { auto pool = rage::GetPoolBase("netGameEvent"); @@ -3325,11 +3323,9 @@ static void NetEventError() for (int i = 0; i < pool->GetSize(); i++) { - auto e = pool->GetAt(i); - - if (e) + if (const auto netGameEvent = pool->GetAt(i)) { - poolCount[GetType(e)]++; + poolCount[netGameEvent->GetName()]++; } }