Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions neo/d3xp/Game_local.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2511,13 +2511,12 @@ gameReturn_t idGameLocal::RunFrame(const usercmd_t* clientCmds) {
framenum++;
previousTime = time;

// dezo2/DG: recalculate each frame, see comment at CalcMSec()
int msec_fast = CalcMSec( framenum );
// dezo2/DG: recalculate each frame in single-player, see comment at CalcMSec()
int msec_fast = isMultiplayer ? USERCMD_MSEC : CalcMSec( framenum );
if ( slowmoState == SLOWMO_STATE_OFF ) {
msec = msec_fast;
msecPrecise = USERCMD_MSEC_PRECISE;
}

time += msec;
realClientTime = time;

Expand Down
8 changes: 7 additions & 1 deletion neo/framework/Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2570,7 +2570,13 @@ void idCommonLocal::Frame( void ) {
} // else a new tic is started anyway (which often means that this frame was too long)
}
else if ( com_ticNumber == ticNumAtStart ) {
Com_WaitForNextTicStart();
// Server: skip the full-frame sleep (it only adds latency).
// Clients keep the wait for proper pacing.
if ( idAsyncNetwork::server.IsActive() ) {
Com_UpdateFrameTime();
} else {
Com_WaitForNextTicStart();
}
}
// else the com_ticNumber has already been updated and it's past time to start the next frame
}
Expand Down
3 changes: 2 additions & 1 deletion neo/game/Game_local.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2276,7 +2276,8 @@ gameReturn_t idGameLocal::RunFrame( const usercmd_t *clientCmds ) {
// update the game time
framenum++;
previousTime = time;
msec = CalcMSec( framenum ); // dezo2/DG: recalculate each frame, see comment at CalcMSec()
// dezo2/DG: recalculate each frame in single-player, see comment at CalcMSec()
msec = isMultiplayer ? USERCMD_MSEC : CalcMSec( framenum );
time += msec;
realClientTime = time;

Expand Down
Loading