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>2010-09-15 21:29:18 +0000
committerStijn Buys <ingar@osirion.org>2010-09-15 21:29:18 +0000
commite55638d081e2e1ff6fbc06e0e8ac0381a04308e7 (patch)
tree511ccb478adf2acd3cc93f66d217b09f3e3a06dc /src/core/entity.h
parentf612f19e095b8d0ba49f5bcdec6a582824315d69 (diff)
updated comments, updated buy menu, info support for map window, added const to target selection
Diffstat (limited to 'src/core/entity.h')
-rw-r--r--src/core/entity.h43
1 files changed, 30 insertions, 13 deletions
diff --git a/src/core/entity.h b/src/core/entity.h
index 1bc93a1..5ddce3a 100644
--- a/src/core/entity.h
+++ b/src/core/entity.h
@@ -92,7 +92,7 @@ public:
}
/// pointer to the model, is used client-side
- inline model::Model * model() {
+ inline model::Model * model() const {
return entity_model;
}
@@ -197,23 +197,31 @@ public:
entity_color_second.assign(color);
}
- /// set dirty flag
+ /**
+ * @brief set dirty flag
+ * setting the dirty flag will cause the server to broadcast changes
+ * to the clients.
+ */
inline void set_dirty(const bool dirty = true) {
entity_dirty = dirty;
}
- /// mark the entity as destroyed
+ /**
+ * @brief mark the entity as destroyed
+ * die() should be called by the game module when it needs to destroy an entity,
+ * the game server will broadcast the delete event to the clients.
+ * The game module should not delete an entity directly.
+ */
virtual void die();
- /// runs one game frame for the entity
/**
+ * @brief runs one game frame for the entity
* The default implementation does nothing
*/
virtual void frame(float seconds);
/**
* @brief set the zone the entity is currently in
- *
* this fuction removes the entity from its previous zone
* and removes it to the new one, if it is not 0
*/
@@ -552,8 +560,8 @@ public:
/// set afterburner/reverse
void set_afterburner(float afterburner);
- /// runs one game frame for the entity
/**
+ * @brief runs one game frame for the entity
* The default implementation will set direction() and thrust() to the desired targets
* and calls its parent frame() funcion.
*/
@@ -564,18 +572,27 @@ public:
protected:
/* target_ variables can be set by the client */
- /// target thrust as set by the client
+
+ /**
+ * @brief target thrust as set by the client
+ */
float target_thrust;
- /// target direction as set by the client
- /** target_direction must be in the [-1, 1] range
+
+ /**
+ * @brief target direction as set by the client
+ * target_direction must be in the [-1, 1] range
*/
float target_direction;
- /// target pitch as set by the client
- /** target_pitch must be in the [-1, 1] range
+
+ /**
+ * @brief target pitch as set by the client
+ * target_pitch must be in the [-1, 1] range
*/
float target_pitch;
- /// target roll as set by the client
- /** target_roll must be in the [-1, 1] range
+
+ /**
+ * @brief target roll as set by the client
+ * target_roll must be in the [-1, 1] range
*/
float target_roll;