-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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).
- Loading branch information
Showing
1 changed file
with
2 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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<void>(i); | ||
|
||
if (e) | ||
if (const auto netGameEvent = pool->GetAt<rage::netGameEvent>(i)) | ||
{ | ||
poolCount[GetType(e)]++; | ||
poolCount[netGameEvent->GetName()]++; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Disquse
Author
Contributor
|
||
} | ||
} | ||
|
||
|
Could this have been renamed to
GetEventName
to match now-known type information?