Fix for multiplayer regressions caused by changes in frame timing - #773
Open
DAPTYX wants to merge 1 commit into
Open
Fix for multiplayer regressions caused by changes in frame timing#773DAPTYX wants to merge 1 commit into
DAPTYX wants to merge 1 commit into
Conversation
Inkub0
added a commit
to Inkub0/dude
that referenced
this pull request
Aug 19, 2026
…ation; MP frame-timing mitigation Fold the genuinely-better parts of dhewm3 PR dhewm#771 ("decouple rendering from game tics") into our own com_interpolate, plus the dhewm3 PR dhewm#773 multiplayer frame-timing mitigation. Both touch the same frame-timing files, so they land together. com_interpolate refinements (all archived cvars, default 1, no-op unless com_interpolate is set; applied to both neo/game/ and neo/d3xp/): - com_interpolateAim: low-latency mouselook. Overlays the pending, not-yet- simulated mouse-look delta onto the rendered view each frame so aiming tracks the mouse 1:1 instead of rendering ~16.7ms (one tic) behind. Exposed ABI- stably via a new idCommon::GetPendingViewAngleDelta() appended to the vtable (forwarding to idUsercmdGenLocal), not by changing idGame::Draw's signature the way dhewm#771 does. The mouse buffer is read non-destructively (only the tic clears it) and the sign/scale/invert + strafe/mlook gating mirror MouseMove() exactly, so it never steals input and doesn't hitch when a tic lands. The view weapon recomposes onto the produced renderView eye so the gun stays locked to the real-time aim. Shooting still resolves at the tic (no gameplay change). - com_interpolateAnim: sample animated entities' skeletal animation at the sub- tic instant (in UpdateRenderEntity), so monster limbs move smoothly above 60fps rather than stepping at the tic rate. Skips the view weapon, which owns renderAnimTimeOffset, to avoid double-applying. - com_interpolateCubic: cubic Hermite (Catmull-Rom) entity position instead of linear lerp, smoother through accelerations. Adds a second history sample (renderInterpOriginPrev2/AxisPrev2/HistCount). Stays strictly interpolation between the last two tics -- no extrapolation, no overshoot. Deliberately not ported from dhewm#771: extrapolation, com_maxFps (we already have com_maxFPS), and the MP async / renderView->time decoupling that PR dhewm#773 had to fix. Our approach keeps the game-DLL ABI stable, stays single-player-scoped, and preserves the eye-relative view-model + gui-glow-light interpolation. MP frame-timing mitigation (dhewm3 PR dhewm#773): use fixed USERCMD_MSEC timing in multiplayer (single-player still recalculates each frame), and skip the full- frame tic-sync sleep on an active server (clients keep it) to avoid the phantom localhost ping and client/server desync from earlier frame-pacing changes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Attempt to isolate server work from the frame pacing changes in c2a14db (caused 16 ms ping, even on localhost) and abd8d4a (caused client-server desync) by restoring the multiplayer behavior. These changes resolved both issues for me.
Testing was performed on CachyOS. The faulty/fixed behavior could only be observed by connecting to the server, not on the client hosting the server.