From 035e7a94ffeb570842de33d773082c219452989e Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sun, 11 Jan 2009 17:59:31 +0000 Subject: fixed the non-working dynamic nameplates --- src/game/client/components/nameplates.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/game/client/components') 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 #include #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); -- cgit 1.4.1