summaryrefslogtreecommitdiff
path: root/src/cgame/cg_draw.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2002-11-16 02:28:07 +0000
committerTim Angus <tim@ngus.net>2002-11-16 02:28:07 +0000
commitb8db650b9abef5bc2a805fbb902f91a996bc31c0 (patch)
tree7e316571dde35002c000257f4798316c25d93823 /src/cgame/cg_draw.c
parent4dedc61c56f1752f08097b93016231dfd68d73be (diff)
* Fixed default hud drawing
Diffstat (limited to 'src/cgame/cg_draw.c')
-rw-r--r--src/cgame/cg_draw.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c
index 055fc939..cb37b8ac 100644
--- a/src/cgame/cg_draw.c
+++ b/src/cgame/cg_draw.c
@@ -2170,7 +2170,7 @@ static void CG_Draw2D( void )
{
vec4_t color;
float w;
- menuDef_t *menu, *defaultMenu;
+ menuDef_t *menu = NULL, *defaultMenu;
color[ 0 ] = color[ 1 ] = color[ 2 ] = color[ 3 ] = 1.0f;
@@ -2190,7 +2190,9 @@ static void CG_Draw2D( void )
//TA: draw the lighting effects e.g. nvg
CG_DrawLighting( );
- menu = Menus_FindByName( BG_FindHudNameForClass( cg.predictedPlayerState.stats[ STAT_PCLASS ] ) );
+ if( cg.predictedPlayerState.stats[ STAT_PTEAM ] != PTE_NONE )
+ menu = Menus_FindByName( BG_FindHudNameForClass( cg.predictedPlayerState.stats[ STAT_PCLASS ] ) );
+
defaultMenu = Menus_FindByName( "default_hud" );
if( cg.snap->ps.persistant[ PERS_TEAM ] == TEAM_SPECTATOR )