Skip to content

Commit

Permalink
Dedicated Server: Interactive mode runs at 35 Hz
Browse files Browse the repository at this point in the history
The special 3 Hz CPU conservation mode is only for non-interactive
servers with no players on them.
  • Loading branch information
skyjake committed May 8, 2012
1 parent 22267e8 commit 684960d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doomsday/engine/portable/src/dd_loop.c
Expand Up @@ -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];
Expand Down Expand Up @@ -110,6 +111,8 @@ int DD_GameLoopExitCode(void)

int DD_GameLoop(void)
{
noninteractive = ArgExists("-noinput");

// Start the deng2 event loop.
return LegacyCore_RunEventLoop(de2LegacyCore);
}
Expand All @@ -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();

Expand Down

0 comments on commit 684960d

Please sign in to comment.