Skip to content

Conversation

@ImAciidz
Copy link
Contributor

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.)

image

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.

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.)
@ThisAMJ ThisAMJ merged commit 7b85b68 into p2sr:master Mar 29, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants