Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-05-07 18:56:00 +0000
committerStijn Buys <ingar@osirion.org>2008-05-07 18:56:00 +0000
commit421fc71813f08bfe359f9ac7596933a7e4cea6e0 (patch)
tree15b3630488281280d6634804b4a1a41fc402ab0a /src/core/gameconnection.cc
parent91d3a0352088611d3b78d3344b7a2bf2d4955a0a (diff)
client-side frame interpolation: network updates, interpolation of position
Diffstat (limited to 'src/core/gameconnection.cc')
-rw-r--r--src/core/gameconnection.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/gameconnection.cc b/src/core/gameconnection.cc
index baf0967..b5ac27d 100644
--- a/src/core/gameconnection.cc
+++ b/src/core/gameconnection.cc
@@ -89,20 +89,21 @@ void GameConnection::frame(float seconds)
}
if (!Cvar::sv_dedicated->value()) {
- update_clientstate();
+ update_clientstate(seconds);
}
+ connection_network->frame(seconds);
+
connection_frametime += seconds;
float f = 0;
if (core::Cvar::sv_framerate->value()) {
- f = 1.0f / core::Cvar::sv_framerate->value();
+ f = 0.5f / core::Cvar::sv_framerate->value();
if (connection_frametime < f) {
return;
}
}
- connection_network->frame(connection_frametime);
connection_frametime = 0;
if (localcontrol() && localcontrol()->dirty()) {