summaryrefslogtreecommitdiff
path: root/src/cgame/cg_ents.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2001-09-19 22:44:11 +0000
committerTim Angus <tim@ngus.net>2001-09-19 22:44:11 +0000
commit5c6c20cfb07fb6f223daf4679bf20d2e11c76a37 (patch)
tree2beda8782208ff80da64f5920fc53d389ffacb86 /src/cgame/cg_ents.c
parent93b163274c3726e87aab10b8494d5a910efe45db (diff)
More integration of TA UI stuff
Diffstat (limited to 'src/cgame/cg_ents.c')
-rw-r--r--src/cgame/cg_ents.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/cgame/cg_ents.c b/src/cgame/cg_ents.c
index df34af3c..c523378f 100644
--- a/src/cgame/cg_ents.c
+++ b/src/cgame/cg_ents.c
@@ -383,6 +383,8 @@ static void CG_Missile( centity_t *cent )
entityState_t *s1;
const weaponInfo_t *weapon;
vec3_t up;
+ float fraction;
+ int index;
s1 = &cent->currentState;
if ( s1->weapon > WP_NUM_WEAPONS ) {
@@ -435,10 +437,18 @@ static void CG_Missile( centity_t *cent )
break;
case WP_FLAMER:
+ fraction = ( ( cg.time - s1->pos.trTime ) / FIREBALL_LIFETIME );
+
+ if( fraction > 1.0f )
+ fraction = 1.0f;
+
ent.reType = RT_SPRITE;
- ent.radius = ( ( cg.time - s1->pos.trTime ) * ( cg.time - s1->pos.trTime ) ) / 9000;
+ ent.radius = fraction * 32;
+ ent.shaderTime = s1->pos.trTime / 1000.0f;
ent.rotation = 0;
- ent.customShader = cgs.media.flameShader;
+
+ index = (int)( fraction * 31 );
+ ent.customShader = cgs.media.flameShader[ index ];
trap_R_AddRefEntityToScene( &ent );
return;
break;