From 4e5343ce9aa83a5c0b04bf744dd287fb56ff39fc Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Thu, 1 May 2008 16:02:51 +0000 Subject: various silly fixes --- src/core/gameconnection.cc | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'src/core/gameconnection.cc') diff --git a/src/core/gameconnection.cc b/src/core/gameconnection.cc index 923d9a3..4f410d5 100644 --- a/src/core/gameconnection.cc +++ b/src/core/gameconnection.cc @@ -88,29 +88,18 @@ void GameConnection::frame(float seconds) return; } - + connection_frametime += seconds; + float f = 0; - if (core::Cvar::sv_framerate->value()) { - connection_frametime += seconds; + if (core::Cvar::sv_framerate->value()) { f = 1.0f / core::Cvar::sv_framerate->value(); if (connection_frametime < f) { - /* - // run client prediction - std::map::iterator it; - for (it=Entity::registry.begin(); it != Entity::registry.end(); it++) { - Entity *entity = (*it).second; - if ((entity->type() == Entity::Controlable) || (entity->type() == Entity::Dynamic)) { - entity->frame(seconds); - } - } - */ return; } - } else { - connection_frametime = seconds; } - + connection_network->frame(connection_frametime); + connection_frametime = 0; if (localcontrol() && localcontrol()->dirty()) { std::ostringstream netmsg; @@ -135,7 +124,6 @@ void GameConnection::frame(float seconds) } connection_network->transmit(); - connection_frametime += f; } } -- cgit v1.2.3