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-08-05 13:31:12 +0000
committerStijn Buys <ingar@osirion.org>2008-08-05 13:31:12 +0000
commit37d132313dbed8007ee6e5cb3c61d59548fb3d4b (patch)
tree914fd90d3e8d01296fd0924c6c7428c5ccc781d6 /src/core/entity.h
parent7ac353a7895f1ab30d09268968bc85ef9394cf41 (diff)
server-side detection of entity zone changes, netserver ent/die responses, removed zone from sup messages
Diffstat (limited to 'src/core/entity.h')
-rw-r--r--src/core/entity.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/core/entity.h b/src/core/entity.h
index feb99f7..40d1ffa 100644
--- a/src/core/entity.h
+++ b/src/core/entity.h
@@ -87,6 +87,9 @@ public:
/// pointer to the zone the entity belongs to
inline Zone *zone() const { return entity_zone; }
+ /// the zone the entity left in case of a zone change
+ inline Zone *oldzone() const { return entity_oldzone; }
+
/// dirty flag
inline bool dirty() const { return entity_dirty; }
@@ -145,6 +148,9 @@ public:
*/
virtual void set_zone(Zone *zone);
+ /// clear all update flags
+ virtual void clear_updates();
+
/*----- static ---------------------------------------------------- */
/// type definition for the entity registry
@@ -192,6 +198,8 @@ public:
protected:
// the zone the entity belongs to
Zone *entity_zone;
+ // the previous zone the entity belonged too
+ Zone *entity_oldzone;
private:
// add an entity to the registry
@@ -200,9 +208,10 @@ private:
// the id is set by add()
unsigned int entity_id;
-
// the entity registry
- static Registry entity_registry;
+ static Registry entity_registry;
+
+ static size_t entity_nextid;
};