Skip to content

[ALL] Fix player spawn angles and initial command timing - #2065

Open
speedvoltage wants to merge 1 commit into
ValveSoftware:masterfrom
speedvoltage:fix/player-initial-command-state
Open

speedvoltage wants to merge 1 commit into
ValveSoftware:masterfrom
speedvoltage:fix/player-initial-command-state

Conversation

@speedvoltage

Copy link
Copy Markdown
Contributor

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 0 instead of the spawn angles. RunNullCommand() and the command-budget fallback clear FIXANGLE_ABSOLUTE before 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.

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

1 participant