mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Slight tweak to the main loop to be more interactive when the game code runs really slow (as opposed to the renderer).
git-svn-id: https://svn.eduke32.com/eduke32@1817 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
0fbd035e54
commit
9c60fd054f
1 changed files with 16 additions and 5 deletions
|
@ -10110,23 +10110,34 @@ MAIN_LOOP_RESTART:
|
|||
}
|
||||
*/
|
||||
|
||||
j = 0;
|
||||
|
||||
do
|
||||
{
|
||||
int32_t clockbeforetic;
|
||||
|
||||
sampletimer();
|
||||
|
||||
if (ready2send == 0) break;
|
||||
|
||||
ototalclock += TICSPERFRAME;
|
||||
|
||||
clockbeforetic = totalclock;
|
||||
|
||||
if (((ud.show_help == 0 && (g_player[myconnectindex].ps->gm&MODE_MENU) != MODE_MENU) || ud.recstat == 2 || (g_netServer || ud.multimode > 1)) &&
|
||||
(g_player[myconnectindex].ps->gm&MODE_GAME) && G_MoveLoop())
|
||||
j++;
|
||||
(g_player[myconnectindex].ps->gm&MODE_GAME)) {
|
||||
G_MoveLoop();
|
||||
}
|
||||
|
||||
sampletimer();
|
||||
|
||||
if (totalclock - clockbeforetic >= TICSPERFRAME) {
|
||||
// computing a tic takes longer than a tic, so we're slowing
|
||||
// the game down. rather than tightly spinning here, go draw
|
||||
// a frame since we're fucked anyway
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (((g_netClient || g_netServer) || !(g_player[myconnectindex].ps->gm & (MODE_MENU|MODE_DEMO))) && totalclock >= ototalclock+TICSPERFRAME);
|
||||
|
||||
if (j) continue;
|
||||
}
|
||||
|
||||
G_DoCheats();
|
||||
|
|
Loading…
Reference in a new issue