From 3da609588ad6fe7eb0581e4678a2ec8c6c1c4a18 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Thu, 31 Jul 2008 12:43:43 +0000 Subject: more heisenbugs fixes --- src/core/clientstate.cc | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/core/clientstate.cc') diff --git a/src/core/clientstate.cc b/src/core/clientstate.cc index 57802fa..865c0bb 100644 --- a/src/core/clientstate.cc +++ b/src/core/clientstate.cc @@ -6,6 +6,7 @@ #include "core/clientstate.h" #include "core/application.h" +#include "sys/sys.h" namespace core { @@ -14,18 +15,24 @@ ClientState::ClientState() state_visible = false; state_detailvisible = false; state_targetable = false; - state_enginesound = 0; - for (size_t i = 0; i < 3; i++) - state_screenlocation[i] = 0; + state_enginesound = 0; + state_engine_trail_offset = 0; state_fuzz = math::randomf(); - state_engine_trail_offset = 0; } ClientState::ClientState(Entity *entity) { - ClientState(); + state_visible = false; + state_detailvisible = false; + state_targetable = false; + + state_enginesound = 0; + state_engine_trail_offset = 0; + + state_fuzz = math::randomf(); + assign(entity); } -- cgit v1.2.3