summaryrefslogtreecommitdiff
path: root/src/cgame/cg_draw.c
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2015-04-08 21:45:16 +0200
committerPaweł Redman <pawel.redman@gmail.com>2015-04-08 21:45:16 +0200
commitee25f4aadf87fa2852bb345062eeecea9e86d1dc (patch)
treeb7dd37970f250812a67c750d63b901c38fbee35f /src/cgame/cg_draw.c
parent0f4407b328c59f132ee5bbf31004d31b81dc3b3b (diff)
Revert human physics to vq3.
Diffstat (limited to 'src/cgame/cg_draw.c')
-rw-r--r--src/cgame/cg_draw.c73
1 files changed, 2 insertions, 71 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c
index 0af9839..570276b 100644
--- a/src/cgame/cg_draw.c
+++ b/src/cgame/cg_draw.c
@@ -375,34 +375,10 @@ static void CG_DrawPlayerStamina( int ownerDraw, rectDef_t *rect,
vec4_t backColor, vec4_t foreColor,
qhandle_t shader )
{
- playerState_t *ps = &cg.snap->ps;
- float stamina = ps->stats[ STAT_STAMINA ];
- float maxStaminaBy3 = (float)STAMINA_MAX / 3.0f;
float progress;
vec4_t color;
- switch( ownerDraw )
- {
- case CG_PLAYER_STAMINA_1:
- progress = ( stamina - 2 * (int)maxStaminaBy3 ) / maxStaminaBy3;
- break;
- case CG_PLAYER_STAMINA_2:
- progress = ( stamina - (int)maxStaminaBy3 ) / maxStaminaBy3;
- break;
- case CG_PLAYER_STAMINA_3:
- progress = stamina / maxStaminaBy3;
- break;
- case CG_PLAYER_STAMINA_4:
- progress = ( stamina + STAMINA_MAX ) / STAMINA_MAX;
- break;
- default:
- return;
- }
-
- if( progress > 1.0f )
- progress = 1.0f;
- else if( progress < 0.0f )
- progress = 0.0f;
+ progress = 0.0f;
Vector4Lerp( progress, backColor, foreColor, color );
@@ -419,25 +395,9 @@ CG_DrawPlayerStaminaBolt
static void CG_DrawPlayerStaminaBolt( rectDef_t *rect, vec4_t backColor,
vec4_t foreColor, qhandle_t shader )
{
- float stamina = cg.snap->ps.stats[ STAT_STAMINA ];
vec4_t color;
- if( cg.predictedPlayerState.stats[ STAT_STATE ] & SS_SPEEDBOOST )
- {
- if( stamina >= 0 )
- Vector4Lerp( ( sin( cg.time / 150.0f ) + 1 ) / 2,
- backColor, foreColor, color );
- else
- Vector4Lerp( ( sin( cg.time / 2000.0f ) + 1 ) / 2,
- backColor, foreColor, color );
- }
- else
- {
- if( stamina < 0 )
- Vector4Copy( backColor, color );
- else
- Vector4Copy( foreColor, color );
- }
+ Vector4Copy( backColor, color );
trap_R_SetColor( color );
CG_DrawPic( rect->x, rect->y, rect->w, rect->h, shader );
@@ -3460,31 +3420,6 @@ void CG_RunMenuScript( char **args )
}
//END TA UI
-
-/*
-================
-CG_DrawLighting
-
-================
-*/
-static void CG_DrawLighting( void )
-{
- // centity_t *cent;
-
- // cent = &cg_entities[ cg.snap->ps.clientNum ];
-
- //fade to black if stamina is low
- if( ( cg.snap->ps.stats[ STAT_STAMINA ] < STAMINA_BLACKOUT_LEVEL ) &&
- ( cg.snap->ps.stats[ STAT_TEAM ] == TEAM_HUMANS ) )
- {
- vec4_t black = { 0, 0, 0, 0 };
- black[ 3 ] = 1.0 - ( (float)( cg.snap->ps.stats[ STAT_STAMINA ] + 1000 ) / 200.0f );
- trap_R_SetColor( black );
- CG_DrawPic( 0, 0, 640, 480, cgs.media.whiteShader );
- trap_R_SetColor( NULL );
- }
-}
-
/*
===============================================================================
@@ -4162,10 +4097,6 @@ 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;