Clean up some trolling from the previous PR #316
Merged
+55
−49
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This was meant to be a force push on the previous PR, but then the PR was merged 8 minutes before I went to go message AMJ to tell him not to merge yet (oops lol).
Anyways, made the thing in LPHud early return, demystified some memes with the MsgFunc_SayText(2) hook, and mostly undid/cleaned up the changes to Interface::GetPtr in favor of a simpler solution. (Related to that, the console module is now initialized first before any other modules, so that it is available immediately within the plugin.)
In context to the above, it seems like when the NetMessage stuff for coop was first added, mlugg was originally writing it around SayText2 and then switched to SayText during feature dev without renaming it (or just mistakenly wrote SayText2 because the offset used here was 100% for SayText, I downloaded a client.dll from that era and checked in Ghidra), and when the update came in 2022 that made the chat pretty or whatever (and shifted the vtable by 1), he changed the offset to actually match SayText2 for real, and probably had to change more code than was needed if it was just switched to the new SayText offset.
Anyways, perhaps some despaghettifying can occur on the SayText2 hook (I am not smart enough nor do I care enough to mess with this myself) if Reloaded/2011 P2 and latest P2 are unified to all use SayText, or SayText2, rather Reloaded/2011 using SayText, and latest P2 using SayText2.