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.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/core/entity.cc b/src/core/entity.cc
index 63fa4e8..e76f254 100644
--- a/src/core/entity.cc
+++ b/src/core/entity.cc
@@ -1073,7 +1073,6 @@ void EntityControlable::ActionInterface::debugDraw(btIDebugDraw* debugDrawer)
EntityControlable::EntityControlable() : EntityDynamic()
{
entity_thrust = 0;
- entity_controlflags = 0;
target_direction = 0.0f;
target_thrust = 0.0f;
@@ -1086,7 +1085,6 @@ EntityControlable::EntityControlable() : EntityDynamic()
entity_owner = 0;
entity_actioninterface = 0;
- entity_controlflags = 0;
entity_health = 100.0f;
}
@@ -1094,7 +1092,6 @@ EntityControlable::EntityControlable(std::istream & is) :
EntityDynamic(is)
{
entity_thrust = 0;
- entity_controlflags = 0;
target_direction = 0.0f;
target_thrust = 0.0f;
@@ -1107,7 +1104,6 @@ EntityControlable::EntityControlable(std::istream & is) :
entity_owner = 0;
entity_actioninterface = 0;
- entity_controlflags = 0;
entity_health = 100.0f;
}
@@ -1295,7 +1291,7 @@ void EntityControlable::set_target_controlflags(int controlflags)
void EntityControlable::set_target_controlflag(const ControlFlags controlflag)
{
- if (!has_controlflag(controlflag)) {
+ if ((target_controlflags & controlflag) == 0) {
target_controlflags = target_controlflags | controlflag;
set_dirty();
}
@@ -1303,7 +1299,7 @@ void EntityControlable::set_target_controlflag(const ControlFlags controlflag)
void EntityControlable::unset_target_controlflag(const ControlFlags controlflag)
{
- if (has_controlflag(controlflag)) {
+ if ((target_controlflags & controlflag) == controlflag) {
target_controlflags = target_controlflags & ~controlflag;
set_dirty();
}