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-05-06 21:07:11 +0000
committerStijn Buys <ingar@osirion.org>2008-05-06 21:07:11 +0000
commit91d3a0352088611d3b78d3344b7a2bf2d4955a0a (patch)
tree74c0a6adf15ae15aa144f66f20272c1fd58a7db3 /src/core/entity.h
parent8fefc1d995083f0d4a9873f216ccc6e15688d0a9 (diff)
client-side frame interpolation: frames and timers
Diffstat (limited to 'src/core/entity.h')
-rw-r--r--src/core/entity.h30
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