From 298149201fa31885130fb0d1193e932aab1b4277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20Ker=C3=A4nen?= Date: Fri, 4 Apr 2014 08:59:56 +0300 Subject: [PATCH] Fixed|Client: Mistake in logic after old GUI code removal "!stopTime" is always true now that stopTime has been removed. --- doomsday/client/src/dd_loop.cpp | 39 +++++++++++++++------------------ 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/doomsday/client/src/dd_loop.cpp b/doomsday/client/src/dd_loop.cpp index e7a2a89d1c..ad73b8f139 100644 --- a/doomsday/client/src/dd_loop.cpp +++ b/doomsday/client/src/dd_loop.cpp @@ -254,33 +254,30 @@ static void advanceTime(timespan_t delta) sysTime += delta; - if(/*!stopTime ||*/ netGame) - { - oldGameTic = SECONDS_TO_TICKS(gameTime); + oldGameTic = SECONDS_TO_TICKS(gameTime); - // The difference between gametic and demotic is that demotic - // is not altered at any point. Gametic changes at handshakes. - gameTime += delta; - demoTime += delta; + // The difference between gametic and demotic is that demotic + // is not altered at any point. Gametic changes at handshakes. + gameTime += delta; + demoTime += delta; - if(DD_IsSharpTick()) + if(DD_IsSharpTick()) + { + // When a new sharp tick begins, we want that the 35 Hz tick + // calculated from gameTime also changes. If this is not the + // case, we will adjust gameTime slightly so that it syncs again. + if(oldGameTic == SECONDS_TO_TICKS(gameTime)) { - // When a new sharp tick begins, we want that the 35 Hz tick - // calculated from gameTime also changes. If this is not the - // case, we will adjust gameTime slightly so that it syncs again. - if(oldGameTic == SECONDS_TO_TICKS(gameTime)) - { - LOGDEV_XVERBOSE("Syncing gameTime with sharp ticks (tic=%i pos=%f)") - << oldGameTic << frameTimePos; + LOGDEV_XVERBOSE("Syncing gameTime with sharp ticks (tic=%i pos=%f)") + << oldGameTic << frameTimePos; - // Realign. - gameTime = (SECONDS_TO_TICKS(gameTime) + 1) / 35.f; - } + // Realign. + gameTime = (SECONDS_TO_TICKS(gameTime) + 1) / 35.f; } - - // World time always advances unless a local game is paused on client-side. - App_WorldSystem().advanceTime(delta); } + + // World time always advances unless a local game is paused on client-side. + App_WorldSystem().advanceTime(delta); } void DD_ResetTimer(void)