Skip to content

don't write m_LastNetworkedValue on interp reset for predicted entities - #2027

Open
kusabana wants to merge 1 commit into
ValveSoftware:masterfrom
kusabana:kusabana/fix-interpolated-predictables
Open

don't write m_LastNetworkedValue on interp reset for predicted entities#2027
kusabana wants to merge 1 commit into
ValveSoftware:masterfrom
kusabana:kusabana/fix-interpolated-predictables

Conversation

@kusabana

@kusabana kusabana commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Description

PR #1392 made the predicted field m_vecPunchAngle interpolated which revealed an issue with interpolated, predicted fields:
when prediction fails, CInterpolatedVar::Reset copies the predicted punch angle into m_LastNetworkedValue

Interp_RestoreToLastNetworked writes m_LastNetworkedValue into m_vecPunchAngle, and OnStoreLastNetworkedValue writes m_vecPunchAngle back into m_LastNetworkedValue. The server only sends m_vecPunchAngle when it changes, so nothing corrects it and the view punch sticks until it changes again, like when firing a weapon.

[Tick 52114] 001 CPlayerLocalData::m_vecPunchAngle - vec[] differs (1st diff) (net 0.000000 0.000000 23.919640 - pred 0.000000 0.000000 23.700041) delta(0.000000 0.000000 -0.219599)
[Tick 52114] Full latch reset!

[Tick 52115] 001 CPlayerLocalData::m_vecPunchAngle - vec[] differs (1st diff) (net 0.000000 0.000000 23.919640 - pred 0.000000 0.000000 23.700041) delta(0.000000 0.000000 -0.219599)
[Tick 52115] Full latch reset!

...

This is especially an issue on community servers that opt to disable certain view punch effects like CGameMovement::PlayerRoughLandingEffects on the server, the client predicts it and gets stuck with the view punch.

This fixes the issue that people are experiencing on many CS:S bhop and surf servers right now.

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