From 684960dcf345b4146e1978c5868108c07d009c0b Mon Sep 17 00:00:00 2001 From: skyjake Date: Tue, 8 May 2012 08:21:59 +0300 Subject: [PATCH] Dedicated Server: Interactive mode runs at 35 Hz The special 3 Hz CPU conservation mode is only for non-interactive servers with no players on them. --- doomsday/engine/portable/src/dd_loop.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doomsday/engine/portable/src/dd_loop.c b/doomsday/engine/portable/src/dd_loop.c index 1806876b16..324331cf89 100644 --- a/doomsday/engine/portable/src/dd_loop.c +++ b/doomsday/engine/portable/src/dd_loop.c @@ -78,6 +78,7 @@ static float fps; static int lastFrameCount; static boolean firstTic = true; static boolean tickIsSharp = false; +static boolean noninteractive = false; #define NUM_FRAMETIME_DELTAS 200 static int timeDeltas[NUM_FRAMETIME_DELTAS]; @@ -110,6 +111,8 @@ int DD_GameLoopExitCode(void) int DD_GameLoop(void) { + noninteractive = ArgExists("-noinput"); + // Start the deng2 event loop. return LegacyCore_RunEventLoop(de2LegacyCore); } @@ -126,7 +129,7 @@ void DD_GameLoopCallback(void) for(i = 1; i < DDMAXPLAYERS; ++i) if(ddPlayers[i].shared.inGame) count++; - LegacyCore_SetLoopRate(de2LegacyCore, count? 35 : 3); + LegacyCore_SetLoopRate(de2LegacyCore, count || !noninteractive? 35 : 3); runTics();