mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Oops, i've missed do while here
# Conflicts: # source/rr/src/game.cpp
This commit is contained in:
parent
d23b4a7e33
commit
1719b70559
1 changed files with 44 additions and 41 deletions
|
@ -7624,54 +7624,57 @@ MAIN_LOOP_RESTART:
|
||||||
double const gameUpdateStartTime = timerGetHiTicks();
|
double const gameUpdateStartTime = timerGetHiTicks();
|
||||||
if (((g_netClient || g_netServer) || !(g_player[myconnectindex].ps->gm & (MODE_MENU|MODE_DEMO))) && totalclock >= ototalclock+TICSPERFRAME)
|
if (((g_netClient || g_netServer) || !(g_player[myconnectindex].ps->gm & (MODE_MENU|MODE_DEMO))) && totalclock >= ototalclock+TICSPERFRAME)
|
||||||
{
|
{
|
||||||
//if (g_networkMode != NET_DEDICATED_SERVER)
|
|
||||||
//{
|
|
||||||
// if (RRRA && g_player[myconnectindex].ps->on_motorcycle)
|
|
||||||
// P_GetInputMotorcycle(myconnectindex);
|
|
||||||
// else if (RRRA && g_player[myconnectindex].ps->on_boat)
|
|
||||||
// P_GetInputBoat(myconnectindex);
|
|
||||||
// else
|
|
||||||
// P_GetInput(myconnectindex);
|
|
||||||
//}
|
|
||||||
|
|
||||||
//Bmemcpy(&inputfifo[0][myconnectindex], &localInput, sizeof(input_t));
|
|
||||||
|
|
||||||
if (!frameJustDrawn)
|
|
||||||
break;
|
|
||||||
|
|
||||||
frameJustDrawn = false;
|
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (ready2send == 0) break;
|
//if (g_networkMode != NET_DEDICATED_SERVER)
|
||||||
Net_GetInput();
|
//{
|
||||||
|
// if (RRRA && g_player[myconnectindex].ps->on_motorcycle)
|
||||||
|
// P_GetInputMotorcycle(myconnectindex);
|
||||||
|
// else if (RRRA && g_player[myconnectindex].ps->on_boat)
|
||||||
|
// P_GetInputBoat(myconnectindex);
|
||||||
|
// else
|
||||||
|
// P_GetInput(myconnectindex);
|
||||||
|
//}
|
||||||
|
|
||||||
ototalclock += TICSPERFRAME;
|
//Bmemcpy(&inputfifo[0][myconnectindex], &localInput, sizeof(input_t));
|
||||||
|
|
||||||
int const moveClock = (int) totalclock;
|
if (!frameJustDrawn)
|
||||||
|
break;
|
||||||
|
|
||||||
if (((ud.show_help == 0 && !GUICapture && (g_player[myconnectindex].ps->gm&MODE_MENU) != MODE_MENU) || ud.recstat == 2 || (g_netServer || ud.multimode > 1)) &&
|
frameJustDrawn = false;
|
||||||
(g_player[myconnectindex].ps->gm&MODE_GAME))
|
|
||||||
{
|
|
||||||
G_MoveLoop();
|
|
||||||
S_Update();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (totalclock - moveClock >= TICSPERFRAME)
|
do
|
||||||
{
|
{
|
||||||
// computing a tic takes longer than a tic, so we're slowing
|
if (ready2send == 0) break;
|
||||||
// the game down. rather than tightly spinning here, go draw
|
Net_GetInput();
|
||||||
// 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);
|
|
||||||
|
|
||||||
gameUpdate = true;
|
ototalclock += TICSPERFRAME;
|
||||||
g_gameUpdateTime = timerGetHiTicks()-gameUpdateStartTime;
|
|
||||||
if (g_gameUpdateAvgTime < 0.f)
|
int const moveClock = (int) totalclock;
|
||||||
g_gameUpdateAvgTime = g_gameUpdateTime;
|
|
||||||
g_gameUpdateAvgTime = ((GAMEUPDATEAVGTIMENUMSAMPLES-1.f)*g_gameUpdateAvgTime+g_gameUpdateTime)/((float) GAMEUPDATEAVGTIMENUMSAMPLES);
|
if (((ud.show_help == 0 && !GUICapture && (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();
|
||||||
|
S_Update();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (totalclock - moveClock >= 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);
|
||||||
|
|
||||||
|
gameUpdate = true;
|
||||||
|
g_gameUpdateTime = timerGetHiTicks()-gameUpdateStartTime;
|
||||||
|
if (g_gameUpdateAvgTime < 0.f)
|
||||||
|
g_gameUpdateAvgTime = g_gameUpdateTime;
|
||||||
|
g_gameUpdateAvgTime = ((GAMEUPDATEAVGTIMENUMSAMPLES-1.f)*g_gameUpdateAvgTime+g_gameUpdateTime)/((float) GAMEUPDATEAVGTIMENUMSAMPLES);
|
||||||
|
} while(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
G_DoCheats();
|
G_DoCheats();
|
||||||
|
|
Loading…
Reference in a new issue