diff options
Diffstat (limited to 'src/core/entity.h')
-rw-r--r-- | src/core/entity.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/core/entity.h b/src/core/entity.h index 596a701..b9ee6bd 100644 --- a/src/core/entity.h +++ b/src/core/entity.h @@ -47,8 +47,8 @@ public: /// Entity shape constants enum Shape {Diamond=0, Sphere=1, Cube=2, Axis=3}; - /// EntityDynamic event state classes - enum Event {Normal=0, NoPower=1, ImpulseInitiate=2, Impulse=3, JumpInitiate=4, Jump=5, Docked=6}; + /// EntityDynamic State constants + enum State {Normal=0, NoPower=1, ImpulseInitiate=2, Impulse=3, JumpInitiate=4, Jump=5, Docked=6, Destroyed=7}; /// entity menus collection typedef typedef std::list<MenuDescription *> Menus; @@ -71,7 +71,7 @@ public: inline unsigned int moduletype() const { return entity_moduletypeid; } /// core type id - virtual inline unsigned int type() const { return Default; } + virtual inline const unsigned int type() const { return Default; } /// entity flags inline unsigned int flags() const { return entity_flags; } @@ -306,16 +306,16 @@ public: /*----- inspectors ------------------------------------------------ */ /// core type id - virtual inline unsigned int type() const { return Entity::Dynamic; } + virtual inline const unsigned int type() const { return Entity::Dynamic; } /// current speed of the entity in game units per second - inline float speed() const { return entity_speed; } + inline const float speed() const { return entity_speed; } /// event state - inline unsigned int eventstate() const { return entity_eventstate; } + inline const int state() const { return entity_state; } /// event state timer - inline float timer() const { return entity_timer; } + inline const float timer() const { return entity_timer; } /*----- serializers ----------------------------------------------- */ @@ -340,7 +340,7 @@ public: virtual void receive_server_update(std::istream &is); /// set event state - virtual void set_eventstate(Event eventstate); + virtual void set_state(int state); /// runs one game frame for the entity /** @@ -355,7 +355,7 @@ public: protected: float entity_timer; - int entity_eventstate; + int entity_state; }; @@ -375,7 +375,7 @@ public: /*----- inspectors ------------------------------------------------ */ /// core type id - virtual inline unsigned int type() const { return Entity::Controlable; } + virtual inline const unsigned int type() const { return Entity::Controlable; } /// owner of this entity inline Player *owner() const { return entity_owner; } @@ -491,7 +491,7 @@ public: /*----- inspectors ------------------------------------------------ */ /// core type id - virtual inline unsigned int type() const { return Entity::Globe; } + virtual inline const unsigned int type() const { return Entity::Globe; } std::string entity_texture; |