mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
Blood: reduce handleevents calls
This commit is contained in:
parent
5ebc65a1fb
commit
371b613ebe
3 changed files with 18 additions and 22 deletions
|
@ -1173,28 +1173,11 @@ RESTART:
|
|||
ready2send = 1;
|
||||
while (!gQuitGame)
|
||||
{
|
||||
handleevents();
|
||||
netUpdate();
|
||||
inputState.SetBindsEnabled(gInputMode == kInputGame);
|
||||
switch (gInputMode)
|
||||
{
|
||||
case kInputGame:
|
||||
LocalKeys();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (gQuitGame)
|
||||
continue;
|
||||
|
||||
OSD_DispatchQueued();
|
||||
|
||||
bool bDraw;
|
||||
if (gGameStarted)
|
||||
{
|
||||
char gameUpdate = false;
|
||||
double const gameUpdateStartTime = timerGetHiTicks();
|
||||
gameHandleEvents();
|
||||
while (gPredictTail < gNetFifoHead[myconnectindex] && !gPaused)
|
||||
{
|
||||
viewUpdatePrediction(&gFifoInput[gPredictTail&255][myconnectindex]);
|
||||
|
@ -1246,12 +1229,26 @@ RESTART:
|
|||
videoClearScreen(0);
|
||||
rotatesprite(160<<16,100<<16,65536,0,2518,0,0,0x4a,0,0,xdim-1,ydim-1);
|
||||
}
|
||||
gameHandleEvents();
|
||||
if (gQuitRequest && !gQuitGame)
|
||||
netBroadcastMyLogoff(gQuitRequest == 2);
|
||||
}
|
||||
if (bDraw)
|
||||
{
|
||||
gameHandleEvents();
|
||||
inputState.SetBindsEnabled(gInputMode == kInputGame);
|
||||
switch (gInputMode)
|
||||
{
|
||||
case kInputGame:
|
||||
LocalKeys();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (gQuitGame)
|
||||
continue;
|
||||
|
||||
OSD_DispatchQueued();
|
||||
|
||||
switch (gInputMode)
|
||||
{
|
||||
case kInputMessage:
|
||||
|
@ -1301,9 +1298,9 @@ RESTART:
|
|||
while (gGameMenuMgr.m_bActive)
|
||||
{
|
||||
gGameMenuMgr.Process();
|
||||
gameHandleEvents();
|
||||
if (G_FPSLimit())
|
||||
{
|
||||
gameHandleEvents();
|
||||
videoClearScreen(0);
|
||||
gGameMenuMgr.Draw();
|
||||
videoNextPage();
|
||||
|
|
|
@ -316,8 +316,6 @@ void CDemo::Playback(void)
|
|||
_DEMOPLAYBACK:
|
||||
while (at1 && !gQuitGame)
|
||||
{
|
||||
handleevents();
|
||||
D_ProcessEvents();
|
||||
while (totalclock >= gNetFifoClock && !gQuitGame)
|
||||
{
|
||||
if (!v4)
|
||||
|
@ -387,6 +385,8 @@ _DEMOPLAYBACK:
|
|||
}
|
||||
if (G_FPSLimit())
|
||||
{
|
||||
handleevents();
|
||||
D_ProcessEvents();
|
||||
viewDrawScreen();
|
||||
videoNextPage();
|
||||
}
|
||||
|
|
|
@ -3071,7 +3071,6 @@ void viewDrawScreen(bool sceneonly)
|
|||
#ifdef USE_OPENGL
|
||||
polymostcenterhoriz = defaultHoriz;
|
||||
#endif
|
||||
gameHandleEvents();
|
||||
ClockTicks delta = totalclock - lastUpdate;
|
||||
if (delta < 0)
|
||||
delta = 0;
|
||||
|
|
Loading…
Reference in a new issue