Skip to content

Commit

Permalink
make game speed a bit more stable
Browse files Browse the repository at this point in the history
  • Loading branch information
jK committed Sep 23, 2012
1 parent fd935fc commit 315410c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rts/Game/GameServer.cpp
Expand Up @@ -888,7 +888,7 @@ void CGameServer::LagProtection()
// adjust game speed to localclient's (:= host) maximum SimFrame rate
//FIXME instead of using CpuUsage for connected clients use their avgSimFrameTime or rather maxSimFPS, too (which isn't send via network yet!)
const float maxSimFPS = (1000.0f / gu->avgSimFrameTime) * (1.0f - gu->reconnectSimDrawBalance);
newSpeed = Clamp(newSpeed, 0.1f, maxSimFPS / GAME_SPEED);
newSpeed = Clamp(newSpeed, 0.1f, ((maxSimFPS / GAME_SPEED) + internalSpeed) * 0.5f);
#endif

//float speedMod = 1.f + wantedCpuUsage - refCpuUsage;
Expand Down

0 comments on commit 315410c

Please sign in to comment.