about summary refs log tree commit diff
path: root/src/game/client
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2009-01-11 17:59:31 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2009-01-11 17:59:31 +0000
commit035e7a94ffeb570842de33d773082c219452989e (patch)
treec6e7d50f1c2ae11e4df08ed50a24b023cd5bfe35 /src/game/client
parentb717297b630dbd1cf226d2b733950c272a85911f (diff)
downloadzcatch-035e7a94ffeb570842de33d773082c219452989e.tar.gz
zcatch-035e7a94ffeb570842de33d773082c219452989e.zip
fixed the non-working dynamic nameplates
Diffstat (limited to 'src/game/client')
-rw-r--r--src/game/client/components/nameplates.cpp3
-rw-r--r--src/game/client/gameclient.hpp1
2 files changed, 2 insertions, 2 deletions
diff --git a/src/game/client/components/nameplates.cpp b/src/game/client/components/nameplates.cpp
index fdceffaf..4a47ea37 100644
--- a/src/game/client/components/nameplates.cpp
+++ b/src/game/client/components/nameplates.cpp
@@ -5,6 +5,7 @@
 #include <game/client/gameclient.hpp>
 #include <game/client/animstate.hpp>
 #include "nameplates.hpp"
+#include "controls.hpp"
 
 void NAMEPLATES::render_nameplate(
 	const NETOBJ_CHARACTER *prev_char,
@@ -22,7 +23,7 @@ void NAMEPLATES::render_nameplate(
 		//gfx_text_color
 		float a = 1;
 		if(config.cl_nameplates_always == 0)
-			a = clamp(1-powf(distance(gameclient.local_target_pos, position)/200.0f,16.0f), 0.0f, 1.0f);
+			a = clamp(1-powf(distance(gameclient.controls->target_pos, position)/200.0f,16.0f), 0.0f, 1.0f);
 			
 		const char *name = gameclient.clients[player_info->cid].name;
 		float tw = gfx_text_width(0, 28.0f, name, -1);
diff --git a/src/game/client/gameclient.hpp b/src/game/client/gameclient.hpp
index beb87b8e..041df10d 100644
--- a/src/game/client/gameclient.hpp
+++ b/src/game/client/gameclient.hpp
@@ -51,7 +51,6 @@ public:
 	int servermode;
 
 	vec2 local_character_pos;
-	vec2 local_target_pos;
 
 	// predicted players
 	CHARACTER_CORE predicted_prev_char;