Skip to content

Commit

Permalink
Merge branch 'fix-net-update-35fps'
Browse files Browse the repository at this point in the history
  • Loading branch information
viti95 committed Sep 13, 2024
2 parents bab204f + 20f9029 commit 9b23774
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions FASTDOOM/d_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,23 @@ void NetUpdate(void)
// check time
nowtime = ticcount;
newtics = nowtime - gametime;
if (newtics > 1) {
newtics = 1;
}
gametime = nowtime;

if (newtics <= 0) {
return;
}
delta = maketic - gametic;
if (delta < 0) {
maketic = gametic;
}

if (uncappedFPS) {
if (newtics > 1) {
newtics = 1;
}

delta = maketic - gametic;
if (delta < 0) {
maketic = gametic;
}
}

//I_Printf("maketics: %d, gametic: %d, newtics: %d, delta: %d\n", maketic, gametic, newtics, delta);

// build new ticcmds for console player
Expand All @@ -83,9 +89,6 @@ void NetUpdate(void)
G_BuildTiccmd(&localcmds[maketic & (BACKUPTICS-1)]);
maketic++;
}

if (singletics)
return; // singletic update is syncronous
}

//
Expand Down

0 comments on commit 9b23774

Please sign in to comment.