[ALL] Fix player spawn angles and initial command timing - #2065
Open
speedvoltage wants to merge 1 commit into
Open
speedvoltage wants to merge 1 commit into
speedvoltage wants to merge 1 commit into
Conversation
Issue: Generated commands clear pending absolute view-angle corrections before the engine can send them. New players also start with a zero command timestamp and simulation clock, which can cause an immediate timeout or a false drowning sound when their clock catches up. Fix: Preserve absolute angle corrections in both fallback command paths, retain replay angle handling, and initialize the command timestamp and simulation clock when the player first spawns.
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.
Issue:
This was mainly in HL2DM, but I am going to consider all games here since the changes below are for both. Connecting or reconnecting to a dedicated server can leave the player's view at
0 0 0instead of the spawn angles.RunNullCommand()and the command-budget fallback clearFIXANGLE_ABSOLUTEbefore the engine sends the correction.New players also start with a zero command timestamp and tick base. This can trigger an immediate timeout or a false drowning sound when the first real command corrects the player's clock.
Fix:
Preserve pending absolute angle corrections in both fallback paths and initialize the command timestamp and player clock in
InitialSpawn(). Retain the existing replay and relative-angle behavior.