summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cgame/cg_draw.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c
index e5371a06..73006beb 100644
--- a/src/cgame/cg_draw.c
+++ b/src/cgame/cg_draw.c
@@ -2260,7 +2260,6 @@ static void CG_DrawLocation( rectDef_t *rect, float scale, int textalign, vec4_t
centity_t *locent;
float maxX;
float tx = rect->x, ty = rect->y;
- qboolean aligned = qfalse;
maxX = rect->x + rect->w;
@@ -2273,13 +2272,11 @@ static void CG_DrawLocation( rectDef_t *rect, float scale, int textalign, vec4_t
if( UI_Text_Width( location, scale, 0 ) < rect->w )
{
CG_AlignText( rect, location, scale, 0.0f, 0.0f, textalign, VALIGN_CENTER, &tx, &ty );
- aligned = qtrue;
- }
-
- if( aligned && textalign == ALIGN_RIGHT ) // If we aligned right, we're not going to cut off on the right
UI_Text_Paint( tx, ty, scale, color, location, 0, 0, ITEM_TEXTSTYLE_NORMAL );
+ }
else
UI_Text_Paint_Limit( &maxX, tx, ty, scale, color, location, 0, 0 );
+
trap_R_SetColor( NULL );
}