diff options
author | Stijn Buys <ingar@osirion.org> | 2008-05-06 21:07:11 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-05-06 21:07:11 +0000 |
commit | 91d3a0352088611d3b78d3344b7a2bf2d4955a0a (patch) | |
tree | 74c0a6adf15ae15aa144f66f20272c1fd58a7db3 /src/core/entity.cc | |
parent | 8fefc1d995083f0d4a9873f216ccc6e15688d0a9 (diff) |
client-side frame interpolation: frames and timers
Diffstat (limited to 'src/core/entity.cc')
-rw-r--r-- | src/core/entity.cc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/core/entity.cc b/src/core/entity.cc index d2fef43..cc956b0 100644 --- a/src/core/entity.cc +++ b/src/core/entity.cc @@ -7,13 +7,9 @@ #include <vector> #include <iomanip> -namespace core -{ - class Entity; -} - #include "sys/sys.h" #include "core/entity.h" +#include "core/cvar.h" namespace core { @@ -101,8 +97,7 @@ Entity::Entity(unsigned int flags) : entity_modelname.clear(); entity_name.clear(); - entity_renderstate = 0; - entity_renderfuzz = math::randomf(); + entity_clientstate = 0; add(this); } @@ -140,14 +135,15 @@ Entity::Entity(std::istream & is) entity_destroyed = false; entity_dirty = false; - entity_renderstate = 0; - entity_renderfuzz = math::randomf(); + entity_clientstate = 0; add(this, entity_id); } Entity::~Entity() { + if (entity_clientstate) + delete entity_clientstate; } void Entity::serialize(std::ostream & os) const |