summaryrefslogtreecommitdiff
path: root/src/cgame
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2003-08-15 02:59:39 +0000
committerTim Angus <tim@ngus.net>2003-08-15 02:59:39 +0000
commite227f846393e5f27d2ee1cc148a8ebfe2fab42c4 (patch)
tree8a717cc56a8c0a9c78444c67b8e04ea9afb380a6 /src/cgame
parent80de4f4d3406bf9af27dcd297f6bedb776b1fa18 (diff)
* Prelim introduction of the blaster
Diffstat (limited to 'src/cgame')
-rw-r--r--src/cgame/cg_ents.c9
-rw-r--r--src/cgame/cg_local.h1
-rw-r--r--src/cgame/cg_main.c1
-rw-r--r--src/cgame/cg_servercmds.c3
-rw-r--r--src/cgame/cg_weapons.c5
5 files changed, 18 insertions, 1 deletions
diff --git a/src/cgame/cg_ents.c b/src/cgame/cg_ents.c
index c09f1c0f..9b57e627 100644
--- a/src/cgame/cg_ents.c
+++ b/src/cgame/cg_ents.c
@@ -361,6 +361,15 @@ static void CG_Missile( centity_t *cent )
switch( cent->currentState.weapon )
{
+ case WP_BLASTER:
+ ent.reType = RT_SPRITE;
+ ent.radius = 4;
+ ent.rotation = 0;
+ ent.customShader = cgs.media.blasterShader;
+ trap_R_AddRefEntityToScene( &ent );
+ return;
+ break;
+
case WP_PULSE_RIFLE:
ent.reType = RT_SPRITE;
ent.radius = 4;
diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h
index c37d5f60..c5fbfbeb 100644
--- a/src/cgame/cg_local.h
+++ b/src/cgame/cg_local.h
@@ -817,6 +817,7 @@ typedef struct
qhandle_t smokePuffRageProShader;
qhandle_t shotgunSmokePuffShader;
qhandle_t plasmaBallShader;
+ qhandle_t blasterShader;
qhandle_t waterBubbleShader;
qhandle_t bloodTrailShader;
diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c
index f070b4a3..f68c7da1 100644
--- a/src/cgame/cg_main.c
+++ b/src/cgame/cg_main.c
@@ -693,6 +693,7 @@ static void CG_RegisterGraphics( void )
cgs.media.smokePuffShader = trap_R_RegisterShader( "smokePuff" );
cgs.media.smokePuffRageProShader = trap_R_RegisterShader( "smokePuffRagePro" );
cgs.media.shotgunSmokePuffShader = trap_R_RegisterShader( "shotgunSmokePuff" );
+ cgs.media.blasterShader = trap_R_RegisterShader( "sprites/plasma1" );
cgs.media.plasmaBallShader = trap_R_RegisterShader( "sprites/plasma1" );
cgs.media.bloodTrailShader = trap_R_RegisterShader( "bloodTrail" );
cgs.media.connectionShader = trap_R_RegisterShader( "disconnected" );
diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c
index 8e9cba9f..31685518 100644
--- a/src/cgame/cg_servercmds.c
+++ b/src/cgame/cg_servercmds.c
@@ -516,7 +516,8 @@ static void CG_SetUIVars( void )
//determine what the player is carrying
for( i = WP_NONE + 1; i < WP_NUM_WEAPONS; i++ )
{
- if( BG_gotWeapon( i, cg.snap->ps.stats ) )
+ if( BG_gotWeapon( i, cg.snap->ps.stats ) &&
+ BG_FindPurchasableForWeapon( i ) )
strcat( carriageCvar, va( "W%d ", i ) );
}
for( i = UP_NONE + 1; i < UP_NUM_UPGRADES; i++ )
diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c
index 58bbcea1..1b9f7599 100644
--- a/src/cgame/cg_weapons.c
+++ b/src/cgame/cg_weapons.c
@@ -1591,6 +1591,11 @@ void CG_MissileHitWall( int weapon, int clientNum, vec3_t origin, vec3_t dir, im
isSprite = qtrue;
break;
+ case WP_BLASTER:
+ mark = cgs.media.burnMarkShader;
+ radius = 4;
+ break;
+
case WP_FLAMER:
sfx = cgs.media.sfx_flamerexp;
mark = cgs.media.burnMarkShader;