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.h')
-rw-r--r--src/core/entity.h23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/core/entity.h b/src/core/entity.h
index 140f6ca..6878f08 100644
--- a/src/core/entity.h
+++ b/src/core/entity.h
@@ -687,7 +687,7 @@ class EntityControlable : public EntityDynamic
public:
/// control flags
- enum ControlFlags {ControlFlagNone = 0, ControlFlagFire = 1, ControlFlagAutoPilot = 2, ControlFlagAutoDock = 4, ControlFlagAutoLevel = 8 };
+ enum ControlFlags {ControlFlagNone = 0, ControlFlagFire = 1, ControlFlagOverride = 2};
/// bullet action interface class
class ActionInterface: public btActionInterface {
@@ -728,16 +728,6 @@ public:
return entity_thrust;
}
- /// control flags
- inline int controlflags() const {
- return entity_controlflags;
- }
-
- /// returns true if the specified control flag is set
- inline bool has_controlflag(ControlFlags controlflag) const {
- return ((controlflag & entity_controlflags) == controlflag);
- }
-
/// physics action
inline ActionInterface *actioninterface() {
return entity_actioninterface;
@@ -751,6 +741,14 @@ public:
return entity_health;
}
+ /**
+ * @brief returns true if a specified control flag is set
+ * */
+ inline bool has_target_controlflag(ControlFlags controlflag)
+ {
+ return ((target_controlflags & controlflag) == controlflag);
+ }
+
/*----- serializers ----------------------------------------------- */
/// serialize the entity to a stream
@@ -837,9 +835,6 @@ protected:
/// physics action interface callback
virtual void action (btScalar seconds);
- /// current control flags
- int entity_controlflags;
-
/// current thrust
float entity_thrust;