Skip to content
Snippets Groups Projects
Commit 6dd27af2 authored by Eidolon's avatar Eidolon
Browse files

Run anti-lag chasecam at tic frequency

Fixes jittery and unstable chasecam in high latency netgames
parent 8908dccc
Branches master
No related tags found
1 merge request!1783Uncapped
...@@ -825,10 +825,17 @@ void D_SRB2Loop(void) ...@@ -825,10 +825,17 @@ void D_SRB2Loop(void)
// Lagless camera! Yay! // Lagless camera! Yay!
if (gamestate == GS_LEVEL && netgame) if (gamestate == GS_LEVEL && netgame)
{ {
if (splitscreen && camera2.chase) // Evaluate the chase cam once for every local realtic
P_MoveChaseCamera(&players[secondarydisplayplayer], &camera2, false); // This might actually be better suited inside G_Ticker or TryRunTics
if (camera.chase) for (tic_t chasecamtics = 0; chasecamtics < realtics; chasecamtics++)
P_MoveChaseCamera(&players[displayplayer], &camera, false); {
if (splitscreen && camera2.chase)
P_MoveChaseCamera(&players[secondarydisplayplayer], &camera2, false);
if (camera.chase)
P_MoveChaseCamera(&players[displayplayer], &camera, false);
}
R_UpdateViewInterpolation();
} }
// (Only display if not already done for frame interp) // (Only display if not already done for frame interp)
cv_frameinterpolation.value == 0 ? D_Display() : 0; cv_frameinterpolation.value == 0 ? D_Display() : 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment