"showtargetname" - enables or disables showing the player name on the HUD when in your crosshair.

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6487 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Bukz
2011-06-01 03:03:33 +00:00
parent f936133d60
commit 33cf8715e7
3 changed files with 9 additions and 1 deletions
+2
View File
@@ -1141,6 +1141,8 @@ docident [cncolumncolor] [colour of CN column in scoreboard];
docargument [N] [0..9] [min 0/max 9/default 5];
docident [radarheight] [change at what height you are floating in the radar-view];
docargument [H] [height] [min 20/max 70/default 35];
docident [showtargetname] [enables or disables showing the player name on the HUD when in your crosshair.];
docargument [N] [0 off, 1 on] [min 0/max 1/default 1] [0];
docsection [Visuals]
docident [aadynshadow] [Sets the size/resolution of the dynamic shadow data.];
docargument [] [the size] [min 0/max 3/default 2];
+5
View File
@@ -4531,6 +4531,11 @@ Output:
<description>change at what height you are floating in the radar-view</description>
<value token="H" description="height" minValue="20" maxValue="70" defaultValue="35" />
</variable>
<variable name="showtargetname">
<description>enables or disables showing the player name on the HUD when in your crosshair.</description>
<value token="N" description="0 off, 1 on" minValue="0" maxValue="1" defaultValue="1"/>
</variable>
</identifiers>
</section>
+2 -1
View File
@@ -701,6 +701,7 @@ COMMANDN(getEngineState, CSgetEngineState, ARG_NONE);
VARP(clockdisplay,0,0,2);
VARP(dbgpos,0,0,1);
VARP(showtargetname,0,1,1);
void gl_drawhud(int w, int h, int curfps, int nquads, int curvert, bool underwater)
{
playerent *p = camera1->type<ENT_CAMERA ? (playerent *)camera1 : player1;
@@ -780,7 +781,7 @@ void gl_drawhud(int w, int h, int curfps, int nquads, int curvert, bool underwat
int commandh = 1570 + FONTH;
if(command) commandh -= rendercommand(20, 1570, VIRTW);
else if(infostr) draw_text(infostr, 20, 1570);
else if(targetplayer) draw_text(colorname(targetplayer), 20, 1570);
else if(targetplayer && showtargetname) draw_text(colorname(targetplayer), 20, 1570);
glLoadIdentity();
glOrtho(0, VIRTW*2, VIRTH*2, 0, -1, 1);
extern int tsens(int x);