diff options
author | Ben Millwood <thebenmachine@gmail.com> | 2009-10-03 12:40:56 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:16:09 +0000 |
commit | e426f3837d6779d25a0def85e82d2bbee8493d4c (patch) | |
tree | 694258fdf9c25b2798cf67c1950687c8c50dc507 /src/cgame | |
parent | 2b5413c8774ab6b5a3cb83c4d84424f95746dea9 (diff) |
* Fix HUD being enabled while dead (caused by r1187)
* Don't allow cg_draw2d to disable no-stamina blindness
Diffstat (limited to 'src/cgame')
-rw-r--r-- | src/cgame/cg_draw.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index d00a41cf..c54068cc 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -2984,6 +2984,10 @@ static void CG_Draw2D( void ) if( cg.levelShot ) return; + // fading to black if stamina runs out + // (only 2D that can't be disabled) + CG_DrawLighting( ); + if( cg_draw2D.integer == 0 ) return; @@ -2993,24 +2997,22 @@ static void CG_Draw2D( void ) return; } - CG_DrawLighting( ); - - if( cg.snap->ps.persistant[ PERS_SPECSTATE ] == SPECTATOR_NOT ) + if( cg.snap->ps.persistant[ PERS_SPECSTATE ] == SPECTATOR_NOT && + !( cg.snap->ps.stats[ STAT_STATE ] & SS_HOVELING ) && + cg.snap->ps.stats[ STAT_HEALTH ] > 0 ) { menu = Menus_FindByName( BG_ClassConfig( cg.predictedPlayerState.stats[ STAT_CLASS ] )->hudName ); + + CG_DrawBuildableStatus( ); } if( !menu ) + { menu = Menus_FindByName( "default_hud" ); - if( !menu ) // still couldn't find it - CG_Error( "Default HUD could not be found" ); - - if( !( cg.snap->ps.stats[ STAT_STATE ] & SS_HOVELING ) && - ( cg.snap->ps.stats[ STAT_HEALTH ] > 0 ) ) - { - CG_DrawBuildableStatus( ); + if( !menu ) // still couldn't find it + CG_Error( "Default HUD could not be found" ); } Menu_Paint( menu, qtrue ); |