diff options
Diffstat (limited to 'src/cgame/cg_draw.c')
-rw-r--r-- | src/cgame/cg_draw.c | 19 |
1 files changed, 19 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; |