diff options
Diffstat (limited to 'src/core/entity.h')
-rw-r--r-- | src/core/entity.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/core/entity.h b/src/core/entity.h index 1e80435..287157b 100644 --- a/src/core/entity.h +++ b/src/core/entity.h @@ -7,6 +7,10 @@ #ifndef __INCLUDED_CORE_ENTITY_H__ #define __INCLUDED_CORE_ENTITY_H__ +#include <iostream> +#include <string> +#include <map> + #include "model/model.h" #include "math/axis.h" #include "math/mathlib.h" @@ -19,12 +23,9 @@ class EntityControlable; } +#include "core/clientstate.h" #include "core/player.h" -#include <iostream> -#include <string> -#include <map> - namespace core { @@ -33,11 +34,11 @@ class Entity { public: /// Entity flags + /** + * entities with the Static flag set will not get client-side interpolation + */ enum Flags {Static=1, Solid=2, Bright=4}; - /// Entity render state flags - enum State {InRange=1, InCloseRange=2}; - /// Entity type constants enum Type {Default=0, Dynamic=1, Controlable=2, Globe=3}; @@ -64,12 +65,6 @@ public: /// core type id virtual inline unsigned int type() const { return Default; } - /// client state - inline unsigned int state() const { return entity_renderstate; } - - /// client render fuzz factor - inline float fuzz() const { return entity_renderfuzz; }; - /// entity flags inline unsigned int flags() const { return entity_flags; } @@ -79,6 +74,9 @@ public: /// entity model name inline std::string const & modelname() { return entity_modelname; } + /// 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; } @@ -158,8 +156,10 @@ public: bool entity_created; bool entity_destroyed; - unsigned int entity_renderstate; - float entity_renderfuzz; + /// timestamp when entity data was received from the server + float entity_servertimestamp; + + ClientState *entity_clientstate; private: /// add an entity to the registry |