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>2008-02-14 18:04:25 +0000
committerStijn Buys <ingar@osirion.org>2008-02-14 18:04:25 +0000
commit715d0c3952a3a1d59b64074e472d0a9a3b414351 (patch)
treea5d0ddd0613caaf4f9fe01f9a3bd34e823651ad5 /src/core/entity.h
parent83e8023c5e46635753a609329cf9805a3520001e (diff)
dedicated server accepts incoming connections
Diffstat (limited to 'src/core/entity.h')
-rw-r--r--src/core/entity.h62
1 files changed, 21 insertions, 41 deletions
diff --git a/src/core/entity.h b/src/core/entity.h
index 6ff3be1..b3dd7ef 100644
--- a/src/core/entity.h
+++ b/src/core/entity.h
@@ -12,7 +12,6 @@ namespace core
class EntityControlable;
}
-#include "core/core.h"
#include "core/player.h"
#include "math/mathlib.h"
@@ -43,9 +42,7 @@ public:
Entity(unsigned int entity_flags = 0);
virtual ~Entity();
- /**
- * @brief core type id
- */
+ /// core type id
virtual inline unsigned int core_type() { return entity::Default; }
/// unique instance identifier, automaticly set
@@ -54,19 +51,20 @@ public:
/// core shape id
entity::Shape core_shape;
- /// core color id
+ /// core color
math::Color core_color;
/// core radius, in game units
float core_radius;
- /// label
+ /// the entities label
std::string label;
/// custom game type id of this entity
unsigned int type;
/// flags
+ /// @see core::entity::Flags
unsigned int flags;
/* updateable by game */
@@ -74,72 +72,54 @@ public:
/// location of the entity
math::Vector3f location;
- /**
- * @brief direction the entity is facing, in degrees
- * A direction of 0 degrees means the entity is 'looking'
- * along the positive X-axis.
- */
+ /// direction the entity is facing, in degrees
+ /// A direction of 0 degrees means the entity is looking
+ /// along the positive X-axis.
float direction;
};
-/**
- * @brief an entity that can move around in the game world
- */
+/// an entity that can move around in the game world
class EntityDynamic : public Entity
{
public:
EntityDynamic(unsigned int entity_flags = 0);
virtual ~EntityDynamic();
- /**
- * @brief core type id
- */
+ /// core type id
virtual inline unsigned int core_type() { return entity::Dynamic; }
/* updateable by game */
- /**
- * @brief current speed of the entity in game units per second
- */
+ /// current speed of the entity in game units per second
float speed;
};
-/**
- * @brief an entity that can be controlled by a player
- */
+/// an entity that can be controlled by a player
class EntityControlable : public EntityDynamic
{
public:
EntityControlable(unsigned int entity_flags = 0);
virtual ~EntityControlable();
- /**
- * @brief core type id
- */
+ /// core type id
virtual inline unsigned int core_type() { return entity::Controlable; }
- /**
- * @brief owner of this controllable entity
- */
+ /// runs one game frame for the entity, to be implemented by game
+ virtual void frame(float seconds) = 0;
+
+ /* updateable by game */
+
+ /// owner of this controllable entity
Player *owner;
/* updatable by client */
- /**
- * @brief the direction the client wants to travel the entity to
- * @see direction
- */
+ /// the direction the client wants to travel the entity to
+ /// @see direction
float target_direction;
- /**
- * @brief engine thrust as set by the client, 0.0f - 1.0f
- */
+ /// engine thrust as set by the client, 0.0f - 1.0f
float target_thrust;
-
- /**
- * @brief runs one game frame for the entity, to be implemented by game
- */
- virtual void frame(float seconds) = 0;
};