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-11-15 19:24:55 +0000
committerStijn Buys <ingar@osirion.org>2008-11-15 19:24:55 +0000
commit28ba97bdd8fb6ca352dc49dba01a66bd155ad523 (patch)
treeeb4abd0505eb842e15201783529814bda1ae6e76 /src/core/entity.h
parent1f0dbeeabdffff096908473168898c5fa63bcff0 (diff)
entity extensions
Diffstat (limited to 'src/core/entity.h')
-rw-r--r--src/core/entity.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/core/entity.h b/src/core/entity.h
index 4e757c1..01fedc2 100644
--- a/src/core/entity.h
+++ b/src/core/entity.h
@@ -24,7 +24,7 @@ class EntityControlable;
}
-#include "core/clientstate.h"
+#include "core/extension.h"
#include "core/descriptions.h"
#include "core/player.h"
#include "core/zone.h"
@@ -35,6 +35,8 @@ namespace core
/// The base world entity. All gameworld entities must derive from this class.
class Entity
{
+ friend class Extension;
+
public:
/// Entity flags
enum Flags {Static=1, Solid=2, Bright=4, Dockable=8};
@@ -80,9 +82,6 @@ public:
/// entity name (can not contain double qoutes ")
inline std::string const & name() { return entity_name; }
- /// entity client render state
- inline ClientState * state() { return entity_clientstate; }
-
/// pointer to the model, is used client-side
inline model::Model * model() { return entity_model; }
@@ -125,6 +124,9 @@ public:
/// entity menus
inline Menus &menus() { return entity_menus; }
+ /// extensions
+ inline Extension *extension(size_t type) { return entity_extension[type]; }
+
/// find a menu
MenuDescription *find_menu(std::string const &label);
@@ -248,8 +250,6 @@ public:
/// timestamp when entity data was received from the server
float entity_servertimestamp;
- ClientState *entity_clientstate;
-
protected:
// the zone the entity belongs to
Zone *entity_zone;
@@ -271,6 +271,8 @@ private:
Menus entity_menus;
+ Extension* entity_extension[4];
+
static Registry entity_registry;
static size_t entity_nextid;