diff options
author | Stijn Buys <ingar@osirion.org> | 2008-05-11 08:39:40 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-05-11 08:39:40 +0000 |
commit | fb227d62e699ebaea6e428f570bedc684873f15b (patch) | |
tree | 8a2a8e9ee4681479bcbd4828bdf7d6f76d5a1be1 /src/core | |
parent | 17e9ce54ee3972b9804174b874652ec0856efcd0 (diff) |
fix movement in local game, fix camera cockpit mode offset
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/gameinterface.cc | 2 | ||||
-rw-r--r-- | src/core/gameserver.cc | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/core/gameinterface.cc b/src/core/gameinterface.cc index 5e2d428..1f4a5cd 100644 --- a/src/core/gameinterface.cc +++ b/src/core/gameinterface.cc @@ -186,7 +186,7 @@ void GameInterface::update_clientstate(float seconds) if (fabs(side) > 0.00005f) { cosangle = math::dotproduct(p, entity->state()->axis().forward()); - if (fabs(cosangle) < 0.99995f) { + if (fabs(cosangle) < 0.99995f) { angle = acos(cosangle) * 180.0f / M_PI; angle = math::sgnf(side) * angle * seconds / (core::game()->serverframetime() - core::game()->clientframetime()); diff --git a/src/core/gameserver.cc b/src/core/gameserver.cc index 3e5241e..5064ccd 100644 --- a/src/core/gameserver.cc +++ b/src/core/gameserver.cc @@ -245,6 +245,7 @@ void GameServer::frame(float seconds) return; server_time += seconds; + server_frametime += seconds; // process incoming network messages if (server_network) { @@ -263,8 +264,6 @@ void GameServer::frame(float seconds) update_clientstate(seconds); } - server_frametime += seconds; - if ((Cvar::sv_dedicated->value() || Cvar::sv_private->value())) { if (core::Cvar::sv_framerate->value()) { float f = 1.0f / core::Cvar::sv_framerate->value(); |