diff options
Diffstat (limited to 'src/core/clientstate.cc')
-rw-r--r-- | src/core/clientstate.cc | 38 |
1 files changed, 38 insertions, 0 deletions
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()); +} + +} |