summaryrefslogtreecommitdiff
path: root/src/cgame/cg_players.c
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2015-06-26 13:46:44 +0200
committerPaweł Redman <pawel.redman@gmail.com>2015-06-26 14:13:09 +0200
commit7ea0e9de3459b4caa9b35b71f742b658b38ef151 (patch)
treef7a0b638d1ff825d4f6171eecd36095ae7ab57f7 /src/cgame/cg_players.c
parentecf51bf1e505e7e36df07eeb30a77a89ef2b7c55 (diff)
More Wraith improvements.
Diffstat (limited to 'src/cgame/cg_players.c')
-rw-r--r--src/cgame/cg_players.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/cgame/cg_players.c b/src/cgame/cg_players.c
index c3afab3..a6ee457 100644
--- a/src/cgame/cg_players.c
+++ b/src/cgame/cg_players.c
@@ -1448,6 +1448,11 @@ static void CG_PlayerUpgrades( centity_t *cent, refEntity_t *torso )
//FIXME: change to tag_back when it exists
CG_PositionRotatedEntityOnTag( &jetpack, torso, torso->hModel, "tag_head" );
+ if( cg.warping )
+ {
+ jetpack.customShader = cgs.media.warpingEnvironmentShader;
+ }
+
trap_R_AddRefEntityToScene( &jetpack );
if( active & ( 1 << UP_JETPACK ) )
@@ -1544,6 +1549,11 @@ static void CG_PlayerUpgrades( centity_t *cent, refEntity_t *torso )
//FIXME: change to tag_back when it exists
CG_PositionRotatedEntityOnTag( &battpack, torso, torso->hModel, "tag_head" );
+ if( cg.warping )
+ {
+ battpack.customShader = cgs.media.warpingEnvironmentShader;
+ }
+
trap_R_AddRefEntityToScene( &battpack );
}
}
@@ -2071,6 +2081,10 @@ void CG_Player( centity_t *cent )
{
legs.customShader = cgs.media.warpingShader;
}
+ else if( cg.warping )
+ {
+ legs.customShader = cgs.media.warpingEnvironmentShader;
+ }
trap_R_AddRefEntityToScene( &legs );
@@ -2109,6 +2123,11 @@ void CG_Player( centity_t *cent )
torso.shadowPlane = shadowPlane;
torso.renderfx = renderfx;
+ if( cg.warping )
+ {
+ torso.customShader = cgs.media.warpingEnvironmentShader;
+ }
+
trap_R_AddRefEntityToScene( &torso );
//
@@ -2140,6 +2159,11 @@ void CG_Player( centity_t *cent )
head.shadowPlane = shadowPlane;
head.renderfx = renderfx;
+ if( cg.warping )
+ {
+ head.customShader = cgs.media.warpingEnvironmentShader;
+ }
+
trap_R_AddRefEntityToScene( &head );
}
@@ -2287,6 +2311,11 @@ void CG_Corpse( centity_t *cent )
legs.nonNormalizedAxes = qtrue;
}
+ if( cg.warping )
+ {
+ legs.customShader = cgs.media.warpingEnvironmentShader;
+ }
+
trap_R_AddRefEntityToScene( &legs );
// if the model failed, allow the default nullmodel to be displayed
@@ -2311,6 +2340,11 @@ void CG_Corpse( centity_t *cent )
torso.shadowPlane = shadowPlane;
torso.renderfx = renderfx;
+ if( cg.warping )
+ {
+ torso.customShader = cgs.media.warpingEnvironmentShader;
+ }
+
trap_R_AddRefEntityToScene( &torso );
//
@@ -2329,6 +2363,11 @@ void CG_Corpse( centity_t *cent )
head.shadowPlane = shadowPlane;
head.renderfx = renderfx;
+ if( cg.warping )
+ {
+ head.customShader = cgs.media.warpingEnvironmentShader;
+ }
+
trap_R_AddRefEntityToScene( &head );
}
}