Skip to content

Conversation

@Renzo904
Copy link
Contributor

@Renzo904 Renzo904 commented Nov 25, 2024

By patching the branch instruction, force the multiplayer portal/ghostportal material when using sar_portalcolor_enable on SinglePlayer.
Overriding gamerules->IsMultiplayer wont work in neither of the functions because that would cause the code to deref PortalMPGameRules()->IsCoOp(), which its null on single player.

I'm not familiar with the code base, so if there is something that could improve, i'll appreciate the advice

TODO:
Implement the same for Linux, and if relevant, older builds of portal, should be possible and in fact, i do know where each function is located at client.so, but i don't know any good tools like cheat engine for Linux to reverse engineer the game

Renzo904 and others added 2 commits November 25, 2024 02:30
By patching the branch instruction, force the multiplayer portal/ghostportal material when using sar_portalcolor
@ThisAMJ ThisAMJ linked an issue Nov 25, 2024 that may be closed by this pull request
ThisAMJ and others added 6 commits November 26, 2024 13:28
drawportalghost is probably different on infra, but it doesn't matter if we find it anyway since there are no portals
and "cleaner" by using Memory::Patch instead of mid hooks
@ThisAMJ ThisAMJ merged commit a8d51d8 into p2sr:master Nov 26, 2024
@Renzo904 Renzo904 deleted the feat-mp-portals-on-sp branch December 15, 2024 18:24
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.

[Feature] Change Portal Color

2 participants