From b8db650b9abef5bc2a805fbb902f91a996bc31c0 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Sat, 16 Nov 2002 02:28:07 +0000 Subject: * Fixed default hud drawing --- src/cgame/cg_draw.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/cgame/cg_draw.c') 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 ) -- cgit