diff options
author | Stijn Buys <ingar@osirion.org> | 2008-05-04 11:39:24 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-05-04 11:39:24 +0000 |
commit | 33e45d8052b385aa8b1fce68122c8d11f50e7e42 (patch) | |
tree | a1a92304f5be2bb322d4d491e737972eb9dd9dfc /src/core | |
parent | 6155d32aa9e5fc2e5548fcc863a64d442cf5770a (diff) |
better target_engine rendering
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; } |