Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/entity.cc2
-rw-r--r--src/core/entity.h5
-rw-r--r--src/core/model.h5
3 files changed, 12 insertions, 0 deletions
diff --git a/src/core/entity.cc b/src/core/entity.cc
index fd28a1c..ebf9723 100644
--- a/src/core/entity.cc
+++ b/src/core/entity.cc
@@ -98,6 +98,7 @@ Entity::Entity(unsigned int flags) :
entity_destroyed = false;
entity_dirty = false;
+ entity_model = 0;
entity_modelname.clear();
entity_name.clear();
@@ -131,6 +132,7 @@ Entity::Entity(std::istream & is)
while ( (is.get(c)) && (c != '"'))
n += c;
entity_modelname = n;
+ entity_model = 0; // this will be resolved later
entity_created = true;
entity_destroyed = false;
diff --git a/src/core/entity.h b/src/core/entity.h
index 323eec7..54479be 100644
--- a/src/core/entity.h
+++ b/src/core/entity.h
@@ -13,6 +13,7 @@ class Entity;
class EntityControlable;
}
+#include "core/model.h"
#include "core/player.h"
#include "math/mathlib.h"
@@ -65,6 +66,9 @@ public:
/// entity model name
inline std::string const & modelname() { return entity_modelname; }
+ /// pointer to the model, is used client-side
+ inline Model * model() { return entity_model; }
+
/// dirty flag
inline bool dirty() const { return entity_dirty; }
@@ -128,6 +132,7 @@ public:
float entity_radius;
std::string entity_name;
std::string entity_modelname;
+ Model *entity_model;
Shape entity_shape;
math::Vector3f entity_location;
math::Color entity_color;
diff --git a/src/core/model.h b/src/core/model.h
index 5deee35..5a3cd72 100644
--- a/src/core/model.h
+++ b/src/core/model.h
@@ -7,6 +7,11 @@
#ifndef __INCLUDED_CORE_MODEL_H__
#define __INCLUDED_CORE_MODEL_H__
+namespace core
+{
+class Model;
+}
+
#include <vector>
#include <map>
#include <list>