summaryrefslogtreecommitdiff
path: root/src/cgame
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
parent93b163274c3726e87aab10b8494d5a910efe45db (diff)
More integration of TA UI stuff
Diffstat (limited to 'src/cgame')
-rw-r--r--src/cgame/cg_ents.c14
-rw-r--r--src/cgame/cg_event.c32
-rw-r--r--src/cgame/cg_local.h2
-rw-r--r--src/cgame/cg_main.c4
-rw-r--r--src/cgame/cg_weapons.c5
5 files changed, 33 insertions, 24 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;
diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c
index 7aebd973..1d2bf6eb 100644
--- a/src/cgame/cg_event.c
+++ b/src/cgame/cg_event.c
@@ -432,22 +432,22 @@ void CG_Menu( int eventParm )
case MN_D_BUILD: trap_SendConsoleCommand( "menu tremulous_alienbuild\n" ); break;
case MN_H_BUILD: trap_SendConsoleCommand( "menu tremulous_humanbuild\n" ); break;
case MN_H_MCU: trap_SendConsoleCommand( "menu tremulous_humanmcu\n" ); break;
- case MN_H_BANK: trap_SendConsoleCommand( "menu hbankmenu\n" ); break;
- case MN_H_NOROOM: trap_SendConsoleCommand( "menu hnoroom\n" ); break;
- case MN_H_NOPOWER: trap_SendConsoleCommand( "menu hnopower\n" ); break;
- case MN_D_NOROOM: trap_SendConsoleCommand( "menu dnoroom\n" ); break;
- case MN_D_NOCREEP: trap_SendConsoleCommand( "menu dnocreep\n" ); break;
- case MN_D_NOHVMND: trap_SendConsoleCommand( "menu dnohvmnd\n" ); break;
- case MN_D_HIVEMIND: trap_SendConsoleCommand( "menu dhivemind\n" ); break;
- case MN_D_NOASSERT: trap_SendConsoleCommand( "menu dnoassert\n" ); break;
- case MN_D_SPWNWARN: trap_SendConsoleCommand( "menu dspwnwarn\n" ); break;
- case MN_H_REACTOR: trap_SendConsoleCommand( "menu hreactor\n" ); break;
- case MN_H_REPEATER: trap_SendConsoleCommand( "menu hrepeater\n" ); break;
- case MN_H_RPLWARN: trap_SendConsoleCommand( "menu hrplwarn\n" ); break;
- case MN_H_RPTWARN: trap_SendConsoleCommand( "menu hrptwarn\n" ); break;
- case MN_H_NOSLOTS: trap_SendConsoleCommand( "menu hnoslots\n" ); break;
- case MN_H_NOFUNDS: trap_SendConsoleCommand( "menu hnofunds\n" ); break;
- case MN_H_ITEMHELD: trap_SendConsoleCommand( "menu hitemheld\n" ); break;
+ case MN_H_BANK: trap_SendConsoleCommand( "menu tremulous_humanbank\n" ); break;
+ case MN_H_NOROOM: trap_SendConsoleCommand( "menu tremulous_human_no_room\n" ); break;
+ case MN_H_NOPOWER: trap_SendConsoleCommand( "menu tremulous_human_no_power\n" ); break;
+ case MN_D_NOROOM: trap_SendConsoleCommand( "menu tremulous_alien_no_room\n" ); break;
+ case MN_D_NOCREEP: trap_SendConsoleCommand( "menu tremulous_alien_no_creep\n" ); break;
+ case MN_D_NOHVMND: trap_SendConsoleCommand( "menu tremulous_alien_no_hivemind\n" ); break;
+ case MN_D_HIVEMIND: trap_SendConsoleCommand( "menu tremulous_alien_one_hivemind\n" ); break;
+ case MN_D_NOASSERT: trap_SendConsoleCommand( "menu tremulous_alien_no_assertion\n" ); break;
+ case MN_D_SPWNWARN: trap_SendConsoleCommand( "menu tremulous_alien_egg_warning\n" ); break;
+ case MN_H_REACTOR: trap_SendConsoleCommand( "menu tremulous_human_one_reactor\n" ); break;
+ case MN_H_REPEATER: trap_SendConsoleCommand( "menu tremulous_human_repeater\n" ); break;
+ case MN_H_RPLWARN: trap_SendConsoleCommand( "menu tremulous_human_replicator_warning\n" ); break;
+ case MN_H_RPTWARN: trap_SendConsoleCommand( "menu tremulous_human_repeater_warning\n" ); break;
+ case MN_H_NOSLOTS: trap_SendConsoleCommand( "menu tremulous_human_no_slots\n" ); break;
+ case MN_H_NOFUNDS: trap_SendConsoleCommand( "menu tremulous_human_no_funds\n" ); break;
+ case MN_H_ITEMHELD: trap_SendConsoleCommand( "menu tremulous_human_item_held\n" ); break;
case MN_D_INFEST: trap_SendConsoleCommand( "menu dinfest\n" ); break;
default:
diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h
index 90c4320a..d98039ec 100644
--- a/src/cgame/cg_local.h
+++ b/src/cgame/cg_local.h
@@ -809,7 +809,7 @@ typedef struct {
qhandle_t droidNav1;
qhandle_t droidHealth;
- qhandle_t flameShader;
+ qhandle_t flameShader[ 32 ];
qhandle_t flameExplShader;
qhandle_t creepShader;
diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c
index 12eb4265..d10ed749 100644
--- a/src/cgame/cg_main.c
+++ b/src/cgame/cg_main.c
@@ -748,7 +748,9 @@ static void CG_RegisterGraphics( void ) {
cgs.media.greenBloodMarkShader = trap_R_RegisterShader( "greenBloodMark" );
cgs.media.explosionTrailShader = trap_R_RegisterShader( "explosionTrail" );
- cgs.media.flameShader = trap_R_RegisterShader( "sprites/flameball" );
+ for( i = 0; i < 32; i++ )
+ cgs.media.flameShader[ i ] = trap_R_RegisterShader( va( "fireball%d", i + 1 ) );
+
cgs.media.creepShader = trap_R_RegisterShader( "creep" );
cgs.media.scannerBlipShader = trap_R_RegisterShader( "gfx/2d/droidhealth" );
diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c
index 9aacd702..50a97655 100644
--- a/src/cgame/cg_weapons.c
+++ b/src/cgame/cg_weapons.c
@@ -718,7 +718,7 @@ void CG_RegisterWeapon( int weaponNum ) {
weaponInfo->missileSound = trap_S_RegisterSound( "sound/weapons/plasma/lasfly.wav", qfalse );
MAKERGB( weaponInfo->flashDlightColor, 0.25, 0.1, 0 );
//weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/railgun/railgf1a.wav", qfalse );
- cgs.media.flameExplShader = trap_R_RegisterShader( "rocketExplosion" );
+ /*cgs.media.flameExplShader = trap_R_RegisterShader( "rocketExplosion" );*/
break;
case WP_PLASMAGUN:
@@ -1839,12 +1839,9 @@ void CG_MissileHitWall( int weapon, int clientNum, vec3_t origin, vec3_t dir, im
radius = 24;
break;
case WP_FLAMER:
- mod = cgs.media.dishFlashModel;
- shader = cgs.media.flameExplShader;
sfx = cgs.media.sfx_lghit2;
mark = cgs.media.burnMarkShader;
radius = 32;
- isSprite = qtrue;
break;
case WP_PLASMAGUN:
mod = cgs.media.ringFlashModel;