diff --git a/source/core/gamecontrol.cpp b/source/core/gamecontrol.cpp index 8bf083cc4..04222dff2 100644 --- a/source/core/gamecontrol.cpp +++ b/source/core/gamecontrol.cpp @@ -138,7 +138,6 @@ void S_ParseSndInfo(); void I_DetectOS(void); void LoadScripts(); void app_loop(); -void DrawFullscreenBlends(); void MainLoop(); @@ -904,7 +903,7 @@ void TickSubsystems() if (cnt == 5) nexttick = nowtick + tickInterval; } -static void updatePauseStatus() +void updatePauseStatus() { // This must go through the network in multiplayer games. if (M_Active() || System_WantGuiCapture()) diff --git a/source/core/gamecontrol.h b/source/core/gamecontrol.h index 8162e3fcd..a448a2675 100644 --- a/source/core/gamecontrol.h +++ b/source/core/gamecontrol.h @@ -16,6 +16,7 @@ class FArgs; extern bool GUICapture; extern bool AppActive; extern cycle_t drawtime, actortime, thinktime, gameupdatetime; +extern bool r_NoInterpolate; extern FMemArena dump; // this is for memory blocks than cannot be deallocated without some huge effort. Put them in here so that they do not register on shutdown. @@ -49,6 +50,7 @@ int32_t CONFIG_GetMapBestTime(char const* const mapname, uint8_t const* const ma int CONFIG_SetMapBestTime(uint8_t const* const mapmd4, int32_t tm); int GameMain(); void startmainmenu(); +void updatePauseStatus(); struct UserConfig { diff --git a/source/core/inputstate.cpp b/source/core/inputstate.cpp index 9c05abf6e..ec42d328f 100644 --- a/source/core/inputstate.cpp +++ b/source/core/inputstate.cpp @@ -160,6 +160,7 @@ int32_t handleevents(void) setViewport(hud_size); setsizeneeded = false; } +#pragma message ("only for old game loop") twod->SetSize(screen->GetWidth(), screen->GetHeight()); twodpsp.SetSize(screen->GetWidth(), screen->GetHeight()); diff --git a/source/core/mainloop.cpp b/source/core/mainloop.cpp index 9b7ab160e..3bffcd060 100644 --- a/source/core/mainloop.cpp +++ b/source/core/mainloop.cpp @@ -179,6 +179,7 @@ static void GameTicker() } C_RunDelayedCommands(); + updatePauseStatus(); switch (gamestate) { @@ -191,6 +192,7 @@ static void GameTicker() case GS_LEVEL: gameupdatetime.Reset(); gameupdatetime.Clock(); + gameclock += 120 / GameTicRate; gi->Ticker(); gameupdatetime.Unclock(); break; @@ -238,6 +240,12 @@ void Display() case GS_LEVEL: if (gametic != 0) { + screen->BeginFrame(); + screen->SetSceneRenderTarget(gl_ssao != 0); + twodpsp.Clear(); + twod->Clear(); + twod->SetSize(screen->GetWidth(), screen->GetHeight()); + twodpsp.SetSize(screen->GetWidth(), screen->GetHeight()); gi->Render(); DrawFullscreenBlends(); } @@ -259,7 +267,7 @@ void Display() DrawRateStuff(); } - videoShowFrame(0); + videoShowFrame(1); } //========================================================================== diff --git a/source/games/duke/src/gameloop.cpp b/source/games/duke/src/gameloop.cpp index 3b12abd07..3d379af00 100644 --- a/source/games/duke/src/gameloop.cpp +++ b/source/games/duke/src/gameloop.cpp @@ -68,7 +68,9 @@ void GameInterface::Ticker() { global_random = krand(); movedummyplayers();//ST 13 + r_NoInterpolate = false; } + else r_NoInterpolate = true; for (int i = connecthead; i >= 0; i = connectpoint2[i]) { diff --git a/source/glbackend/glbackend.cpp b/source/glbackend/glbackend.cpp index 6b1dcbfa2..ec4012843 100644 --- a/source/glbackend/glbackend.cpp +++ b/source/glbackend/glbackend.cpp @@ -489,13 +489,17 @@ void videoShowFrame(int32_t w) }); screen->Update(); screen->mVertexData->Reset(); - // After finishing the frame, reset everything for the next frame. This needs to be done better. - screen->BeginFrame(); - bool useSSAO = (gl_ssao != 0); - screen->SetSceneRenderTarget(useSSAO); - twodpsp.Clear(); - twod->Clear(); videoSetBrightness(0); // immediately reset this after rendering so that the value doesn't stick around in the backend. + + // After finishing the frame, reset everything for the next frame. This needs to be done better. + if (!w) + { + screen->BeginFrame(); + bool useSSAO = (gl_ssao != 0); + screen->SetSceneRenderTarget(useSSAO); + twodpsp.Clear(); + twod->Clear(); + } } TMap cachemap;