Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2009-03-07 13:57:09 +0000
committerStijn Buys <ingar@osirion.org>2009-03-07 13:57:09 +0000
commit4c53365c16362156529c7669079e31845384589f (patch)
tree193bb5d05299d2acb38311d108c1d39b6e1dd229 /src/core/entity.h
parentee2200638be3fcb14097f3e8b0abb93e210f93d9 (diff)
renamed Entity::eventstate() to Entity::state(),
introduced Destroyed state
Diffstat (limited to 'src/core/entity.h')
-rw-r--r--src/core/entity.h22
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;