about summary refs log tree commit diff
path: root/src/game/client/components/nameplates.cpp
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2011-01-04 13:11:01 +0100
committeroy <Tom_Adams@web.de>2011-01-04 13:11:01 +0100
commit67f86e35476fc3e8a812d399f12021b320bc51d6 (patch)
treec482c8773b505473762304d00d72b82ea7d936c4 /src/game/client/components/nameplates.cpp
parent1928a757c6054a622fc7895e316ac89f102007ff (diff)
downloadzcatch-67f86e35476fc3e8a812d399f12021b320bc51d6.tar.gz
zcatch-67f86e35476fc3e8a812d399f12021b320bc51d6.zip
added option to change nameplates size by RushPL
Diffstat (limited to 'src/game/client/components/nameplates.cpp')
-rw-r--r--src/game/client/components/nameplates.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game/client/components/nameplates.cpp b/src/game/client/components/nameplates.cpp
index cdddddcb..39d081a9 100644
--- a/src/game/client/components/nameplates.cpp
+++ b/src/game/client/components/nameplates.cpp
@@ -20,6 +20,8 @@ void CNamePlates::RenderNameplate(
 	
 	vec2 Position = mix(vec2(pPrevChar->m_X, pPrevChar->m_Y), vec2(pPlayerChar->m_X, pPlayerChar->m_Y), IntraTick);
 	
+
+	float FontSize = 18.0f + 20.0f * g_Config.m_ClNameplatesSize / 100.0f;
 	// render name plate
 	if(!pPlayerInfo->m_Local)
 	{
@@ -28,7 +30,7 @@ void CNamePlates::RenderNameplate(
 			a = clamp(1-powf(distance(m_pClient->m_pControls->m_TargetPos, Position)/200.0f,16.0f), 0.0f, 1.0f);
 			
 		const char *pName = m_pClient->m_aClients[pPlayerInfo->m_ClientId].m_aName;
-		float tw = TextRender()->TextWidth(0, 28.0f, pName, -1);
+		float tw = TextRender()->TextWidth(0, FontSize, pName, -1);
 		
 		TextRender()->TextColor(1.0f, 1.0f, 1.0f, a);
 		if(m_pClient->m_Snap.m_pGameobj && m_pClient->m_Snap.m_pGameobj->m_Flags&GAMEFLAG_TEAMS)
@@ -39,7 +41,7 @@ void CNamePlates::RenderNameplate(
 				TextRender()->TextColor(0.7f, 0.7f, 1.0f, a);
 		}
 		
-		TextRender()->Text(0, Position.x-tw/2.0f, Position.y-60, 28.0f, pName, -1);
+		TextRender()->Text(0, Position.x-tw/2.0f, Position.y-FontSize-38.0f, FontSize, pName, -1);
 		
 		if(g_Config.m_Debug) // render client id when in debug aswell
 		{