Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/entity.cc')
-rw-r--r--src/core/entity.cc14
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