From 33e45d8052b385aa8b1fce68122c8d11f50e7e42 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 4 May 2008 11:39:24 +0000 Subject: better target_engine rendering --- src/core/gameserver.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/core') 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::iterator it; @@ -358,7 +360,7 @@ void GameServer::frame(float seconds) } } - server_frametime -= f; + server_frametime = 0; } -- cgit v1.2.3