From 930db4020b9af2ccd999cb3a8c980cc9d527f8cf Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 10 May 2008 10:19:16 +0000 Subject: client-side axis interpolation --- src/core/clientstate.cc | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/core/clientstate.cc (limited to 'src/core/clientstate.cc') diff --git a/src/core/clientstate.cc b/src/core/clientstate.cc new file mode 100644 index 0000000..b34b16a --- /dev/null +++ b/src/core/clientstate.cc @@ -0,0 +1,38 @@ +/* + core/clientstate.cc + This file is part of the Osirion project and is distributed under + the terms of the GNU General Public License version 2 +*/ + +#include "core/clientstate.h" + +namespace core { + +ClientState::ClientState() +{ + state_visible = false; + state_detailvisible = false; + state_fuzz = math::randomf(); +} + +ClientState::ClientState(Entity *entity) +{ + state_visible = false; + state_detailvisible = false; + state_fuzz = math::randomf(); + assign(entity); +} + +ClientState::~ClientState() +{} + +void ClientState::assign(Entity * entity) +{ + state_location.assign(entity->location()); + state_axis.assign(entity->axis()); + + state_previouslocation.assign(entity->location()); + state_previousaxis.assign(entity->axis()); +} + +} -- cgit v1.2.3