Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-08-02 18:53:57 +0000
committerStijn Buys <ingar@osirion.org>2008-08-02 18:53:57 +0000
commit38bfca98a4203130251b4848d1f4c0f0c3c28ff4 (patch)
treec0ecc741440906b89d2a802dfc684538a566d9d7 /src/core
parent417485ca452b95b591af5fb639bf9bbb793e9912 (diff)
improved globe rendering
Diffstat (limited to 'src/core')
-rw-r--r--src/core/clientstate.cc5
-rw-r--r--src/core/clientstate.h5
2 files changed, 9 insertions, 1 deletions
diff --git a/src/core/clientstate.cc b/src/core/clientstate.cc
index 865c0bb..8e9c2e5 100644
--- a/src/core/clientstate.cc
+++ b/src/core/clientstate.cc
@@ -20,6 +20,7 @@ ClientState::ClientState()
state_engine_trail_offset = 0;
state_fuzz = math::randomf();
+ state_distance = -1;
}
ClientState::ClientState(Entity *entity)
@@ -32,7 +33,8 @@ ClientState::ClientState(Entity *entity)
state_engine_trail_offset = 0;
state_fuzz = math::randomf();
-
+ state_distance = -1;
+
assign(entity);
}
@@ -56,6 +58,7 @@ void ClientState::assign(Entity * entity)
state_previouslocation.assign(entity->location());
state_previousaxis.assign(entity->axis());
+ state_distance = -1;
}
}
diff --git a/src/core/clientstate.h b/src/core/clientstate.h
index 42ead3d..f914d0e 100644
--- a/src/core/clientstate.h
+++ b/src/core/clientstate.h
@@ -43,6 +43,8 @@ public:
inline bool targetable() const { return state_targetable; }
+ inline float distance() const { return state_distance; }
+
/// client render fuzz factor
inline float fuzz() const { return state_fuzz; };
@@ -65,6 +67,9 @@ public:
float state_fuzz;
float state_engine_trail_offset;
+ /// distance from the camera eye to the entity
+ float state_distance;
+
size_t state_enginesound;
};