diff options
Diffstat (limited to 'src/cgame')
-rw-r--r-- | src/cgame/cg_consolecmds.c | 1 | ||||
-rw-r--r-- | src/cgame/cg_ents.c | 32 | ||||
-rw-r--r-- | src/cgame/cg_weapons.c | 6 |
3 files changed, 23 insertions, 16 deletions
diff --git a/src/cgame/cg_consolecmds.c b/src/cgame/cg_consolecmds.c index 697796de..63e095df 100644 --- a/src/cgame/cg_consolecmds.c +++ b/src/cgame/cg_consolecmds.c @@ -324,6 +324,7 @@ void CG_InitConsoleCommands( void ) { trap_AddCommand ("sell"); trap_AddCommand ("deposit"); trap_AddCommand ("withdraw"); + trap_AddCommand ("spawnbody"); trap_AddCommand ("itemact"); trap_AddCommand ("itemdeact"); trap_AddCommand ("itemtoggle"); diff --git a/src/cgame/cg_ents.c b/src/cgame/cg_ents.c index a7e95e1c..8cc0fe1b 100644 --- a/src/cgame/cg_ents.c +++ b/src/cgame/cg_ents.c @@ -289,20 +289,21 @@ 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; + { + fraction = ( ( cg.time - s1->pos.trTime ) / FIREBALL_LIFETIME ); - ent.reType = RT_SPRITE; - ent.radius = fraction * 32; - ent.shaderTime = s1->pos.trTime / 1000.0f; - ent.rotation = 0; - - index = (int)( fraction * 31 ); - ent.customShader = cgs.media.flameShader[ index ]; - trap_R_AddRefEntityToScene( &ent ); - return; + if( fraction > 1.0f ) + fraction = 1.0f; + + ent.reType = RT_SPRITE; + ent.radius = fraction * 32; + ent.rotation = s1->generic1; + + index = (int)( fraction * 31 ); + ent.customShader = cgs.media.flameShader[ index ]; + trap_R_AddRefEntityToScene( &ent ); + return; + } break; default: @@ -910,7 +911,7 @@ void CG_AddPacketEntities( void ) { cgIP.numAlienClients = 0; cgIP.numHumanClients = 0; - for ( num = 0 ; num < cg.snap->numEntities ; num++ ) + for( num = 0 ; num < cg.snap->numEntities ; num++ ) { cent = &cg_entities[ cg.snap->entities[ num ].number ]; @@ -953,7 +954,8 @@ void CG_AddPacketEntities( void ) { //Com_Printf( "%d %d\n", cgIP.numAlienClients, cgIP.numHumanClients ); // add each entity sent over by the server - for ( num = 0 ; num < cg.snap->numEntities ; num++ ) { + for( num = 0; num < cg.snap->numEntities; num++ ) + { cent = &cg_entities[ cg.snap->entities[ num ].number ]; CG_AddCEntity( cent ); } diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index 1df76a89..089df54f 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -650,6 +650,8 @@ void CG_RegisterWeapon( int weaponNum ) switch( weaponNum ) { case WP_TESLAGEN: + case WP_AREA_ZAP: + case WP_DIRECT_ZAP: MAKERGB( weaponInfo->flashDlightColor, 0.6f, 0.6f, 1.0f ); weaponInfo->readySound = trap_S_RegisterSound( "sound/weapons/melee/fsthum.wav", qfalse ); weaponInfo->firingSound = trap_S_RegisterSound( "sound/weapons/lightning/lg_hum.wav", qfalse ); @@ -1741,6 +1743,8 @@ void CG_MissileHitWall( int weapon, int clientNum, vec3_t origin, vec3_t dir, im { default: case WP_TESLAGEN: + case WP_AREA_ZAP: + case WP_DIRECT_ZAP: mod = cgs.media.lightningExplosionModel; shader = cgs.media.lightningShader; sfx = cgs.media.sfx_lghit; @@ -1754,7 +1758,7 @@ void CG_MissileHitWall( int weapon, int clientNum, vec3_t origin, vec3_t dir, im isSprite = qtrue; break; case WP_FLAMER: - sfx = cgs.media.sfx_lghit; + sfx = cgs.media.sfx_plasmaexp; mark = cgs.media.burnMarkShader; radius = 32; break; |