Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/application.cc4
-rw-r--r--src/core/entity.cc12
-rw-r--r--src/core/gameconnection.cc2
3 files changed, 12 insertions, 6 deletions
diff --git a/src/core/application.cc b/src/core/application.cc
index 7d6f62a..358c655 100644
--- a/src/core/application.cc
+++ b/src/core/application.cc
@@ -263,12 +263,12 @@ void Application::frame(float seconds)
// execute commands in the buffer
CommandBuffer::exec();
+ application_time += seconds;
+
// don't run zero lenght time frames
if (seconds == 0.0f)
return;
- application_time += seconds;
-
if (!connected())
return;
diff --git a/src/core/entity.cc b/src/core/entity.cc
index 4cce2cb..a0da4ea 100644
--- a/src/core/entity.cc
+++ b/src/core/entity.cc
@@ -295,14 +295,18 @@ void EntityControlable::frame(float seconds)
void EntityControlable::set_thrust(float thrust)
{
- target_thrust = thrust;
- entity_dirty = true;
+ if (!(thrust == target_thrust)) {
+ target_thrust = thrust;
+ entity_dirty = true;
+ }
}
void EntityControlable::set_direction(float direction)
{
- target_direction = direction;
- entity_dirty = true;
+ if (!(target_direction == direction)) {
+ target_direction = direction;
+ entity_dirty = true;
+ }
}
}
diff --git a/src/core/gameconnection.cc b/src/core/gameconnection.cc
index 07a27a6..4c31f78 100644
--- a/src/core/gameconnection.cc
+++ b/src/core/gameconnection.cc
@@ -94,6 +94,7 @@ void GameConnection::frame(float seconds)
connection_frametime += seconds;
f = 1.0f / core::Cvar::sv_framerate->value();
if (connection_frametime < f) {
+ /*
// run client prediction
std::map<unsigned int, Entity *>::iterator it;
for (it=Entity::registry.begin(); it != Entity::registry.end(); it++) {
@@ -102,6 +103,7 @@ void GameConnection::frame(float seconds)
entity->frame(seconds);
}
}
+ */
return;
}
} else {