Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/entity.cc')
-rw-r--r--src/core/entity.cc12
1 files changed, 8 insertions, 4 deletions
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;
+ }
}
}