diff options
author | /dev/humancontroller <devhc@example.com> | 2014-07-13 19:16:08 +0200 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-03-09 13:51:13 +0100 |
commit | f62e00c4ac73d7b3803cad8bd8eaa260531b0381 (patch) | |
tree | c6b01046347e90bbcbebedc2874756e22023560e /src/cgame/cg_draw.c | |
parent | 7a159b88bb85822c58a21c0d13fc2d8d90b3fb68 (diff) |
also use configstring #CS_LOCATIONS+0 for storing location names
includes some refactoring
Diffstat (limited to 'src/cgame/cg_draw.c')
-rw-r--r-- | src/cgame/cg_draw.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index 4d70b343..690df742 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -2645,10 +2645,9 @@ static void CG_DrawLocation( rectDef_t *rect, float scale, int textalign, vec4_t maxX = rect->x + rect->w; locent = CG_GetPlayerLocation( ); - if( locent ) - location = CG_ConfigString( CS_LOCATIONS + locent->currentState.generic1 ); - else - location = CG_ConfigString( CS_LOCATIONS ); + if( !locent ) + return; + location = CG_ConfigString( CS_LOCATIONS + locent->currentState.generic1 ); // need to skip horiz. align if it's too long, but valign must be run either way if( UI_Text_Width( location, scale ) < rect->w ) |