summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cgame/cg_draw.c19
-rw-r--r--ui/menudef.h1
2 files changed, 20 insertions, 0 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c
index 223bba86..8f19c341 100644
--- a/src/cgame/cg_draw.c
+++ b/src/cgame/cg_draw.c
@@ -2255,6 +2255,22 @@ static void CG_ScanForCrosshairEntity( void )
/*
=====================
+CG_DrawLocation
+=====================
+*/
+static void CG_DrawLocation( rectDef_t *rect, float scale, vec4_t color )
+{
+ const char *location;
+ float maxX;
+ maxX = rect->x + rect->w;
+ location = CG_ConfigString( CS_LOCATIONS + cgs.clientinfo[ cg.clientNum ].location );
+
+ UI_Text_Paint_Limit( &maxX, rect->x, rect->y, scale, color, location, 0, 0 );
+ trap_R_SetColor( NULL );
+}
+
+/*
+=====================
CG_DrawCrosshairNames
=====================
*/
@@ -2403,6 +2419,9 @@ void CG_OwnerDraw( float x, float y, float w, float h, float text_x,
case CG_SPECTATORS:
CG_DrawTeamSpectators( &rect, scale, textvalign, color, shader );
break;
+ case CG_PLAYER_LOCATION:
+ CG_DrawLocation( &rect, scale, color );
+ break;
case CG_PLAYER_CROSSHAIRNAMES:
CG_DrawCrosshairNames( &rect, scale, textStyle );
break;
diff --git a/ui/menudef.h b/ui/menudef.h
index 629655bf..6290cf42 100644
--- a/ui/menudef.h
+++ b/ui/menudef.h
@@ -178,5 +178,6 @@
#define CG_PLAYER_CHARGE_BAR_BG 76
#define CG_PLAYER_CHARGE_BAR 77
#define CG_PLAYER_CROSSHAIR 78
+#define CG_PLAYER_LOCATION 79
#endif