diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/gameserver.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/core/gameserver.cc b/src/core/gameserver.cc index bedab1d..ae2b3a9 100644 --- a/src/core/gameserver.cc +++ b/src/core/gameserver.cc @@ -256,14 +256,16 @@ void GameServer::frame(float seconds) if (localplayer()->dirty()) localplayer()->update_info(); - float f = 0; server_frametime += seconds; - if (core::Cvar::sv_framerate->value()) { - f = 1.0f / core::Cvar::sv_framerate->value(); - if (server_frametime < f) { - return; + + if ((Cvar::sv_dedicated->value() || Cvar::sv_private->value())) { + if (core::Cvar::sv_framerate->value()) { + float f = 1.0f / core::Cvar::sv_framerate->value(); + if (server_frametime < f) { + return; + } } - } + } // run a time frame on each entity std::map<unsigned int, Entity *>::iterator it; @@ -358,7 +360,7 @@ void GameServer::frame(float seconds) } } - server_frametime -= f; + server_frametime = 0; } |