Skip to content

Conversation

@KiIoOnline
Copy link
Contributor

Adds back in reportal boosts from floor reportals.

KiIoOnline and others added 2 commits April 13, 2025 01:44
Adds back in reportal boosts from floor reportals.
a) we don't trust FCVAR_CHEAT to handle all possible cheating like a silver bullet. you can turn on the cvar in singleplayer without cheats on, for example. to be extra safe with cheat features, we don't rely on change callbacks and instead check it every tick

b) we don't need to do this whole mess with iNewConVarValue and pszNewConVarVal, just use a boolean lmfao. at the moment, we don't use change callbacks at all, but this could change in the future.

c) Memory::Patch is made specifically for this kind of thing, and flushing the instruction cache is unnecessary. We don't need to nop the jump instruction entirely, just switch the instruction to JO (jump if overflow) which is never true by nature. This makes the logic more concise and less intrusive. The first `patch->Execute` initializes the patch with the data it is replacing.

d) as a general housekeeping convention, keep the newline at EOF. visual studio likes to kill it automatically, which is part of why i just don't use it.

e) the boards API is not necessarily board.portal2.sr. for example, mel is mel.board.portal2.sr, and others can be added in future. see src/Features/AutoSubmit.cpp:431
Copy link
Contributor Author

@KiIoOnline KiIoOnline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested out the changes, works the same as the previous implementation so looks good.

@ThisAMJ ThisAMJ merged commit f731a7f into p2sr:master Apr 15, 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