diff options
author | Tim Angus <tim@ngus.net> | 2003-09-30 03:12:47 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2003-09-30 03:12:47 +0000 |
commit | c760ccba1b81e343726f00cf405ae44c58488969 (patch) | |
tree | c36fd71e5f4f87807dfbdec891de2c6e3e0ad7a1 /src/cgame | |
parent | 7bebc75da4232a1e002102ac59b41868e39ce541 (diff) |
* Human and alien buildable destructions are now particle system powered
* Acid tube effect is now particle system powered
* Disabled hitSound
* Sound other random tidyups
Diffstat (limited to 'src/cgame')
-rw-r--r-- | src/cgame/cg_buildable.c | 190 | ||||
-rw-r--r-- | src/cgame/cg_ents.c | 36 | ||||
-rw-r--r-- | src/cgame/cg_event.c | 43 | ||||
-rw-r--r-- | src/cgame/cg_local.h | 41 | ||||
-rw-r--r-- | src/cgame/cg_main.c | 18 | ||||
-rw-r--r-- | src/cgame/cg_particles.c | 12 | ||||
-rw-r--r-- | src/cgame/cg_playerstate.c | 10 |
7 files changed, 264 insertions, 86 deletions
diff --git a/src/cgame/cg_buildable.c b/src/cgame/cg_buildable.c index 84c8226b..119a84a4 100644 --- a/src/cgame/cg_buildable.c +++ b/src/cgame/cg_buildable.c @@ -34,6 +34,171 @@ char *cg_buildableSoundNames[ MAX_BUILDABLE_ANIMATIONS ] = sfxHandle_t defaultAlienSounds[ MAX_BUILDABLE_ANIMATIONS ]; sfxHandle_t defaultHumanSounds[ MAX_BUILDABLE_ANIMATIONS ]; + +/* +================== +CG_AlienBuildableExplosionFragment +================== +*/ +void CG_AlienBuildableExplosionFragment( vec3_t origin, vec3_t velocity, qhandle_t hModel ) +{ + localEntity_t *le; + refEntity_t *re; + + le = CG_AllocLocalEntity( ); + re = &le->refEntity; + + le->leType = LE_FRAGMENT; + le->startTime = cg.time; + le->endTime = le->startTime + 5000 + random( ) * 3000; + + VectorCopy( origin, re->origin ); + AxisCopy( axisDefault, re->axis ); + re->hModel = hModel; + + le->pos.trType = TR_GRAVITY; + VectorCopy( origin, le->pos.trBase ); + VectorCopy( velocity, le->pos.trDelta ); + le->pos.trTime = cg.time; + + le->bounceFactor = 0.3; + + le->leBounceSoundType = LEBS_BLOOD; + le->leMarkType = LEMT_GREENBLOOD; +} + +/* +=================== +CG_AlienBuildableExplosion + +Generated a bunch of gibs launching out from a location +=================== +*/ +#define GGIB_VELOCITY 250 +#define GGIB_JUMP 250 +void CG_AlienBuildableExplosion( vec3_t origin, vec3_t dir ) +{ + vec3_t velocity; + int count; + particleSystem_t *ps; + + // allow gibs to be turned off for speed + if( cg_gibs.integer ) + { + for( count = 0; count <= 9; count++ ) + { + velocity[ 0 ] = crandom( ) * GGIB_VELOCITY; + velocity[ 1 ] = crandom( ) * GGIB_VELOCITY; + velocity[ 2 ] = GGIB_JUMP + crandom( ) * GGIB_VELOCITY; + CG_AlienBuildableExplosionFragment( origin, velocity, cgs.media.gibAbdomen ); + } + } + + //particle system + ps = CG_SpawnNewParticleSystem( cgs.media.alienBuildableDestroyedPS ); + CG_SetParticleSystemOrigin( ps, origin ); + CG_SetParticleSystemNormal( ps, dir ); + CG_AttachParticleSystemToOrigin( ps ); +} + + +/* +================== +CG_HumanBuildableExplosionFragment +================== +*/ +static void CG_HumanBuildableExplosionFragment( vec3_t origin, vec3_t velocity, qhandle_t hModel ) +{ + localEntity_t *le; + refEntity_t *re; + + le = CG_AllocLocalEntity( ); + re = &le->refEntity; + + le->leType = LE_FRAGMENT; + le->startTime = cg.time; + le->endTime = le->startTime + 10000 + ( crandom( ) * 3000 ); + + VectorCopy( origin, re->origin ); + AxisCopy( axisDefault, re->axis ); + re->hModel = hModel; + re->shaderTime = cg.time / 1000.0f; + + le->pos.trType = TR_GRAVITY; + VectorCopy( origin, le->pos.trBase ); + VectorCopy( velocity, le->pos.trDelta ); + le->pos.trTime = cg.time; + + le->bounceFactor = 0.3; + + le->leBounceSoundType = LEBS_BANG; + le->leMarkType = LEMT_BANG; +} + + +/* +================= +CG_HumanBuildableExplosion + +Called for human buildables as they are destroyed +================= +*/ +#define EXF_VELOCITY 250 +#define EXF_JUMP 250 +void CG_HumanBuildableExplosion( vec3_t origin, vec3_t dir ) +{ + vec3_t lightColor, fragOrigin, velocity; + localEntity_t *le; + int i; + qhandle_t gibModel; + particleSystem_t *ps; + + lightColor[ 0 ] = 1; + lightColor[ 1 ] = 0.75; + lightColor[ 2 ] = 0.0; + + trap_S_StartSound( origin, ENTITYNUM_WORLD, CHAN_AUTO, cgs.media.humanBuildableExpl ); + + // + // create the explosion -- only the light is important really + // + le = CG_MakeExplosion( origin, dir, cgs.media.dishFlashModel, + cgs.media.explosionShader, + 1000, qtrue ); + le->light = 300; + VectorCopy( lightColor, le->lightColor ); + + //fragments + for( i = 1; i <= 8; i++ ) + { + VectorCopy( origin, fragOrigin ); + velocity[ 0 ] = crandom( ) * EXF_VELOCITY; + velocity[ 1 ] = crandom( ) * EXF_VELOCITY; + velocity[ 2 ] = EXF_JUMP + crandom( ) * EXF_VELOCITY; + + switch( i ) + { + case 1: gibModel = cgs.media.metalGib1; break; + case 2: gibModel = cgs.media.metalGib2; break; + case 3: gibModel = cgs.media.metalGib3; break; + case 4: gibModel = cgs.media.metalGib4; break; + case 5: gibModel = cgs.media.metalGib5; break; + case 6: gibModel = cgs.media.metalGib6; break; + case 7: gibModel = cgs.media.metalGib7; break; + case 8: gibModel = cgs.media.metalGib8; break; + } + + CG_HumanBuildableExplosionFragment( fragOrigin, velocity, gibModel ); + } + + //particle system + ps = CG_SpawnNewParticleSystem( cgs.media.humanBuildableDestroyedPS ); + CG_SetParticleSystemOrigin( ps, origin ); + CG_SetParticleSystemNormal( ps, dir ); + CG_AttachParticleSystemToOrigin( ps ); +} + + #define CREEP_SCALEDOWN_TIME 3000 #define CREEP_SIZE 64.0f @@ -83,7 +248,7 @@ static void CG_Creep( centity_t *cent ) size = CREEP_SIZE * frac; if( size > 0.0f ) - CG_ImpactMark( cgs.media.greenBloodMarkShader, origin, cent->currentState.origin2, + CG_ImpactMark( cgs.media.creepShader, origin, cent->currentState.origin2, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, qfalse, size, qtrue ); } @@ -579,21 +744,6 @@ void CG_GhostBuildable( buildable_t buildable ) trap_R_AddRefEntityToScene( &ent ); } -#define MAX_SMOKE_TIME 500 -#define MIN_SMOKE_TIME 100 -#define SMOKE_SPREAD 89.0f -#define SMOKE_LIFETIME 1000 - -#define MAX_SPARK_TIME 5000 -#define MIN_SPARK_TIME 800 -#define SPARK_SPREAD 80.0f -#define SPARK_LIFETIME 1500 - -#define BLEED_TIME 1500 -#define BLEED_SPREAD 80.0f -#define BLEED_LIFETIME 1000 -#define MAX_BLEED_BLOBS 6 - /* ================== CG_BuildableParticleEffects @@ -742,7 +892,15 @@ void CG_Buildable( centity_t *cent ) // if set to invisible, skip if( es->eFlags & EF_NODRAW ) + { + if( cent->buildablePS != NULL ) + { + CG_DestroyParticleSystem( cent->buildablePS ); + cent->buildablePS = NULL; + } + return; + } memset ( &ent, 0, sizeof( ent ) ); diff --git a/src/cgame/cg_ents.c b/src/cgame/cg_ents.c index dda0e3e0..0d8f26de 100644 --- a/src/cgame/cg_ents.c +++ b/src/cgame/cg_ents.c @@ -631,7 +631,7 @@ static void CG_LightFlare( centity_t *cent ) if( cg_lightFlare.integer == FLARE_REALFADE ) { //draw "correct" albeit inefficient flares - srLocal = cent->lastFlareSrcRadius; + srLocal = cent->lfs.lastSrcRadius; //flare radius is likely to be the same as last frame so start with it do @@ -657,7 +657,7 @@ static void CG_LightFlare( centity_t *cent ) ratio = srLocal / srcRadius; - cent->lastFlareSrcRadius = srLocal; + cent->lfs.lastSrcRadius = srLocal; } else if( cg_lightFlare.integer == FLARE_TIMEFADE ) { @@ -666,30 +666,30 @@ static void CG_LightFlare( centity_t *cent ) CG_Trace( &tr, start, mins, maxs, end, cg.predictedPlayerState.clientNum, MASK_SHOT ); - if( ( tr.fraction < 1.0f || tr.startsolid ) && cent->flareStatus ) + if( ( tr.fraction < 1.0f || tr.startsolid ) && cent->lfs.status ) { - cent->flareStatus = qfalse; - cent->lastFlareTime = cg.time; + cent->lfs.status = qfalse; + cent->lfs.lastTime = cg.time; } - else if( ( tr.fraction == 1.0f && !tr.startsolid ) && !cent->flareStatus ) + else if( ( tr.fraction == 1.0f && !tr.startsolid ) && !cent->lfs.status ) { - cent->flareStatus = qtrue; - cent->lastFlareTime = cg.time; + cent->lfs.status = qtrue; + cent->lfs.lastTime = cg.time; } //fade flare up - if( cent->flareStatus ) + if( cent->lfs.status ) { - if( cent->lastFlareTime + es->time > cg.time ) - ratio = (float)( cg.time - cent->lastFlareTime ) / es->time; + if( cent->lfs.lastTime + es->time > cg.time ) + ratio = (float)( cg.time - cent->lfs.lastTime ) / es->time; } //fade flare down - if( !cent->flareStatus ) + if( !cent->lfs.status ) { - if( cent->lastFlareTime + es->time > cg.time ) + if( cent->lfs.lastTime + es->time > cg.time ) { - ratio = (float)( cg.time - cent->lastFlareTime ) / es->time; + ratio = (float)( cg.time - cent->lfs.lastTime ) / es->time; ratio = 1.0f - ratio; } else @@ -710,12 +710,12 @@ static void CG_LightFlare( centity_t *cent ) } else { - ratio = cent->lastFlareRatio; - flare.radius = cent->lastFlareRadius; + ratio = cent->lfs.lastRatio; + flare.radius = cent->lfs.lastRadius; } - cent->lastFlareRatio = ratio; - cent->lastFlareRadius = flare.radius; + cent->lfs.lastRatio = ratio; + cent->lfs.lastRadius = flare.radius; if( ratio < 1.0f ) { diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c index 5a0c29a1..bf77d489 100644 --- a/src/cgame/cg_event.c +++ b/src/cgame/cg_event.c @@ -94,7 +94,7 @@ static void CG_Obituary( entityState_t *ent ) message = "should have run further"; break; case MOD_ASPAWN: - message = "was melted by the acid blood"; + message = "shouldn't have trod in the acid"; break; case MOD_MGTURRET: message = "was gunned down by a turret"; @@ -661,10 +661,16 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) CG_MissileHitWall( es->weapon, es->generic1, 0, position, dir, IMPACTSOUND_METAL ); break; - case EV_BUILDABLE_EXPLOSION: - DEBUGNAME( "EV_BUILDABLE_EXPLOSION" ); + case EV_HUMAN_BUILDABLE_EXPLOSION: + DEBUGNAME( "EV_HUMAN_BUILDABLE_EXPLOSION" ); ByteToDir( es->eventParm, dir ); - CG_Explosion( 0, position, dir ); + CG_HumanBuildableExplosion( position, dir ); + break; + + case EV_ALIEN_BUILDABLE_EXPLOSION: + DEBUGNAME( "EV_ALIEN_BUILDABLE_EXPLOSION" ); + ByteToDir( es->eventParm, dir ); + CG_AlienBuildableExplosion( position, dir ); break; case EV_TESLATRAIL: @@ -738,12 +744,6 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) CG_GibPlayer( cent->lerpOrigin ); break; - case EV_GIB_ALIEN: - DEBUGNAME( "EV_GIB_ALIEN" ); - trap_S_StartSound( NULL, es->number, CHAN_BODY, cgs.media.gibSound ); - CG_GenericGib( cent->lerpOrigin ); - break; - case EV_STOPLOOPINGSOUND: DEBUGNAME( "EV_STOPLOOPINGSOUND" ); trap_S_StopLoopingSound( es->number ); @@ -760,7 +760,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) if( clientNum == cg.predictedPlayerState.clientNum ) { //FIXME: change to "negative" sound - trap_S_StartLocalSound( cgs.media.hitSound, CHAN_LOCAL_SOUND ); + trap_S_StartLocalSound( cgs.media.buildableRepairedSound, CHAN_LOCAL_SOUND ); cg.lastBuildAttempt = cg.time; } break; @@ -812,6 +812,27 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) } break; + case EV_ALIEN_EVOLVE: + DEBUGNAME( "EV_ALIEN_EVOLVE" ); + trap_S_StartSound( NULL, es->number, CHAN_BODY, cgs.media.alienEvolveSound ); + { + particleSystem_t *ps = CG_SpawnNewParticleSystem( cgs.media.alienEvolvePS ); + CG_SetParticleSystemCent( ps, cent ); + CG_AttachParticleSystemToCent( ps ); + } + break; + + case EV_ALIEN_ACIDTUBE: + DEBUGNAME( "EV_ALIEN_ACIDTUBE" ); + { + particleSystem_t *ps = CG_SpawnNewParticleSystem( cgs.media.alienAcidTubePS ); + CG_SetParticleSystemCent( ps, cent ); + ByteToDir( es->eventParm, dir ); + CG_SetParticleSystemNormal( ps, dir ); + CG_AttachParticleSystemToCent( ps ); + } + break; + case EV_PLAYER_RESPAWN: DEBUGNAME( "EV_PLAYER_RESPAWN" ); if( es->number == cg.clientNum ) diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index af572513..b5b35a43 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -224,6 +224,7 @@ typedef struct baseParticle_s qboolean overdrawProtection; qboolean realLight; + qboolean cullOnStartSolid; } baseParticle_t; @@ -390,6 +391,15 @@ typedef struct qboolean barrelSpinning; } playerEntity_t; +typedef struct lightFlareStatus_s +{ + float lastSrcRadius; //caching of likely flare source radius + float lastRadius; //caching of likely flare radius + float lastRatio; //caching of likely flare ratio + int lastTime; //last time flare was visible/occluded + qboolean status; //flare is visble? +} lightFlareStatus_t; + //================================================= #define MAX_CENTITY_PARTICLE_SYSTEMS 8 @@ -437,11 +447,7 @@ typedef struct centity_s buildableAnimNumber_t oldBuildableAnim; //to detect when new anims are set particleSystem_t *buildablePS; - float lastFlareSrcRadius; //caching of likely flare source radius - float lastFlareRadius; //caching of likely flare radius - float lastFlareRatio; //caching of likely flare ratio - int lastFlareTime; //last time flare was visible/occluded - qboolean flareStatus; //flare is visble? + lightFlareStatus_t lfs; qboolean doorState; @@ -1114,13 +1120,6 @@ typedef struct sfxHandle_t useNothingSound; sfxHandle_t wearOffSound; sfxHandle_t footsteps[ FOOTSTEP_TOTAL ][ 4 ]; - sfxHandle_t sfx_ric1; - sfxHandle_t sfx_ric2; - sfxHandle_t sfx_ric3; - sfxHandle_t sfx_railg; - sfxHandle_t sfx_rockexp; - sfxHandle_t sfx_plasmaexp; - sfxHandle_t sfx_flamerexp; sfxHandle_t gibSound; sfxHandle_t gibBounce1Sound; sfxHandle_t gibBounce2Sound; @@ -1134,10 +1133,8 @@ typedef struct sfxHandle_t fallSound; sfxHandle_t jumpPadSound; - sfxHandle_t hitSound; - sfxHandle_t hitSoundHighArmor; - sfxHandle_t hitSoundLowArmor; - sfxHandle_t hitTeamSound; + sfxHandle_t hgrenb1aSound; + sfxHandle_t hgrenb2aSound; sfxHandle_t voteNow; sfxHandle_t votePassed; @@ -1169,9 +1166,6 @@ typedef struct qhandle_t selectCursor; qhandle_t sizeCursor; - sfxHandle_t hgrenb1aSound; - sfxHandle_t hgrenb2aSound; - //TA: for wolf trail effects qhandle_t sparkFlareShader; @@ -1192,9 +1186,15 @@ typedef struct sfxHandle_t buildableRepairedSound; qhandle_t poisonCloudPS; + qhandle_t alienEvolvePS; + qhandle_t alienAcidTubePS; + sfxHandle_t alienEvolveSound; + qhandle_t humanBuildableDamagedPS; + qhandle_t humanBuildableDestroyedPS; qhandle_t alienBuildableDamagedPS; + qhandle_t alienBuildableDestroyedPS; } cgMedia_t; @@ -1517,6 +1517,8 @@ sfxHandle_t CG_CustomSound( int clientNum, const char *soundName ); void CG_GhostBuildable( buildable_t buildable ); void CG_Buildable( centity_t *cent ); void CG_InitBuildables( ); +void CG_HumanBuildableExplosion( vec3_t origin, vec3_t dir ); +void CG_AlienBuildableExplosion( vec3_t origin, vec3_t dir ); // // cg_spriter.c @@ -1588,7 +1590,6 @@ void CG_RegisterWeapon( int weaponNum ); void CG_FireWeapon( centity_t *cent, weaponMode_t weaponMode ); void CG_MissileHitWall( weapon_t weapon, weaponMode_t weaponMode, int clientNum, vec3_t origin, vec3_t dir, impactSound_t soundType ); -void CG_Explosion( int clientNum, vec3_t origin, vec3_t dir ); void CG_MissileHitPlayer( weapon_t weapon, weaponMode_t weaponMode, vec3_t origin, vec3_t dir, int entityNum ); void CG_Bullet( vec3_t origin, int sourceEntityNum, vec3_t normal, qboolean flesh, int fleshEntityNum ); diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c index d5b85231..93c0e431 100644 --- a/src/cgame/cg_main.c +++ b/src/cgame/cg_main.c @@ -590,8 +590,6 @@ static void CG_RegisterSounds( void ) cgs.media.talkSound = trap_S_RegisterSound( "sound/player/talk.wav", qfalse ); cgs.media.landSound = trap_S_RegisterSound( "sound/player/land1.wav", qfalse ); - cgs.media.hitSound = trap_S_RegisterSound( "sound/feedback/hit.wav", qfalse ); - cgs.media.watrInSound = trap_S_RegisterSound( "sound/player/watr_in.wav", qfalse ); cgs.media.watrOutSound = trap_S_RegisterSound( "sound/player/watr_out.wav", qfalse ); cgs.media.watrUnSound = trap_S_RegisterSound( "sound/player/watr_un.wav", qfalse ); @@ -640,14 +638,9 @@ static void CG_RegisterSounds( void ) cgs.media.jetpackIdleSound = trap_S_RegisterSound( "sound/upgrades/jetpack/idle.wav", qfalse ); cgs.media.jetpackAscendSound = trap_S_RegisterSound( "sound/upgrades/jetpack/hi.wav", qfalse ); - cgs.media.humanBuildableExpl = trap_S_RegisterSound( "sound/weapons/rocket/rocklx1a.wav", qfalse ); + cgs.media.alienEvolveSound = trap_S_RegisterSound( "sound/player/alienevolve.wav", qfalse ); - // FIXME: only needed with item - cgs.media.sfx_ric1 = trap_S_RegisterSound( "sound/weapons/machinegun/ric1.wav", qfalse ); - cgs.media.sfx_ric2 = trap_S_RegisterSound( "sound/weapons/machinegun/ric2.wav", qfalse ); - cgs.media.sfx_ric3 = trap_S_RegisterSound( "sound/weapons/machinegun/ric3.wav", qfalse ); - cgs.media.sfx_plasmaexp = trap_S_RegisterSound( "sound/weapons/plasma/plasmx1a.wav", qfalse ); - cgs.media.sfx_flamerexp = trap_S_RegisterSound( "sound/weapons/flamer/fireimpc.wav", qfalse ); + cgs.media.humanBuildableExpl = trap_S_RegisterSound( "sound/weapons/rocket/rocklx1a.wav", qfalse ); cgs.media.hgrenb1aSound = trap_S_RegisterSound( "sound/weapons/grenade/hgrenb1a.wav", qfalse ); cgs.media.hgrenb2aSound = trap_S_RegisterSound( "sound/weapons/grenade/hgrenb2a.wav", qfalse ); @@ -716,6 +709,8 @@ static void CG_RegisterGraphics( void ) cgs.media.greenBloodMarkShader = trap_R_RegisterShader( "greenBloodMark" ); cgs.media.explosionTrailShader = trap_R_RegisterShader( "explosionTrail" ); + cgs.media.creepShader = trap_R_RegisterShader( "creep" ); + cgs.media.scannerBlipShader = trap_R_RegisterShader( "gfx/2d/blip" ); cgs.media.scannerLineShader = trap_R_RegisterShader( "white" ); /*cgs.media.scannerShader = trap_R_RegisterShader( "gfx/2d/scanner" );*/ @@ -788,7 +783,8 @@ static void CG_RegisterGraphics( void ) cgs.media.wakeMarkShader = trap_R_RegisterShader( "wake" ); cgs.media.bloodMarkShader = trap_R_RegisterShader( "bloodMark" ); - cgs.media.poisonCloudPS = CG_RegisterParticleSystem( "poisonCloud" ); + cgs.media.poisonCloudPS = CG_RegisterParticleSystem( "poisonCloudPS" ); + cgs.media.alienAcidTubePS = CG_RegisterParticleSystem( "alienAcidTubePS" ); cgs.media.jetPackDescendPS = CG_RegisterParticleSystem( "jetPackDescendPS" ); cgs.media.jetPackHoverPS = CG_RegisterParticleSystem( "jetPackHoverPS" ); @@ -796,6 +792,8 @@ static void CG_RegisterGraphics( void ) cgs.media.humanBuildableDamagedPS = CG_RegisterParticleSystem( "humanBuildableDamagedPS" ); cgs.media.alienBuildableDamagedPS = CG_RegisterParticleSystem( "alienBuildableDamagedPS" ); + cgs.media.humanBuildableDestroyedPS = CG_RegisterParticleSystem( "humanBuildableDestroyedPS" ); + cgs.media.alienBuildableDestroyedPS = CG_RegisterParticleSystem( "alienBuildableDestroyedPS" ); // register the inline models cgs.numInlineModels = trap_CM_NumInlineModels( ); diff --git a/src/cgame/cg_particles.c b/src/cgame/cg_particles.c index 52b9203e..fee11a04 100644 --- a/src/cgame/cg_particles.c +++ b/src/cgame/cg_particles.c @@ -805,6 +805,12 @@ static qboolean CG_ParseParticle( baseParticle_t *bp, char **text_p ) continue; } + else if( !Q_stricmp( token, "cullOnStartSolid" ) ) + { + bp->cullOnStartSolid = qtrue; + + continue; + } else if( !Q_stricmp( token, "radius" ) ) { token = COM_Parse( text_p ); @@ -1624,8 +1630,12 @@ static void CG_EvaluateParticlePhysics( particle_t *p ) } //remove particles that get into a CONTENTS_NODROP brush - if( ( trap_CM_PointContents( trace.endpos, 0 ) & CONTENTS_NODROP ) || trace.startsolid ) + if( ( trap_CM_PointContents( trace.endpos, 0 ) & CONTENTS_NODROP ) || + ( bp->cullOnStartSolid && trace.startsolid ) ) { + if( cg_debugParticles.integer >= 1 ) + CG_Printf( "Particle in CONTENTS_NODROP or trace.startsolid\n" ); + p->valid = qfalse; return; } diff --git a/src/cgame/cg_playerstate.c b/src/cgame/cg_playerstate.c index d43f41a8..68a0a2f1 100644 --- a/src/cgame/cg_playerstate.c +++ b/src/cgame/cg_playerstate.c @@ -241,16 +241,6 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) if( ps->persistant[ PERS_TEAM ] != ops->persistant[ PERS_TEAM ] ) return; - // hit changes - if( ps->persistant[ PERS_HITS ] > ops->persistant[ PERS_HITS ] ) - { - /*armor = ps->persistant[PERS_ATTACKEE_ARMOR] & 0xff; - health = ps->persistant[PERS_ATTACKEE_ARMOR] >> 8;*/ - trap_S_StartLocalSound( cgs.media.hitSound, CHAN_LOCAL_SOUND ); - } - else if( ps->persistant[ PERS_HITS ] < ops->persistant[ PERS_HITS ] ) - trap_S_StartLocalSound( cgs.media.hitTeamSound, CHAN_LOCAL_SOUND ); - // health changes of more than -1 should make pain sounds if( ps->stats[ STAT_HEALTH ] < ops->stats[ STAT_HEALTH ] - 1 ) { |