Added PM_CheckStuck hook to prevent non-native gameplay changes#578
Open
Tankfird wants to merge 1 commit intoYaLTeR:masterfrom
Open
Added PM_CheckStuck hook to prevent non-native gameplay changes#578Tankfird wants to merge 1 commit intoYaLTeR:masterfrom
Tankfird wants to merge 1 commit intoYaLTeR:masterfrom
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The PM_PlayerMove hook was calling PM_CheckStuck() for bxt_fire_on_stuck check. The issue with this is the function tries to unstick the player every few frames using
static int rgStuckLast[MAX_CLIENTS][2];to keep track of the last offset to use. The call in the hook would sometimes cause it to take the pathWhich resets the rgStuckLast to 0 and normally
return 0;would cause normal player movement code to run, this is skipped in the hook.Ingame you can use
bxt_ch_set_pos_offset 0 0 -0.1withbxt_hud_velocity 1while moving on the ground, normal stuck behavior you'll see velocity quickly get cleared out with just gravity in zvel. Currently with bxt loaded it might never reach that and you'll maintain velocity while stuck. This may have affected some op4 speedruns as we use the rope to get stuck in the ground with velocity to then object boost for speed. Also may have allowed some other stuck tricks to work (tripmines, snarks, etc.), might desync some TAS.