diff options
Diffstat (limited to 'src/cgame')
-rw-r--r-- | src/cgame/cg_weapons.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index ac0f6a14..b020c8bb 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -1816,7 +1816,25 @@ void CG_MissileHitEntity( weapon_t weaponNum, weaponMode_t weaponMode, weaponMode = WPM_PRIMARY; if( weapon->wim[ weaponMode ].alwaysImpact ) - CG_MissileHitWall( weaponNum, weaponMode, 0, origin, dir, IMPACTSOUND_FLESH, charge ); + { + int sound; + + if( cg_entities[ entityNum ].currentState.eType == ET_PLAYER ) + { + // Players + sound = IMPACTSOUND_FLESH; + } + else if( cg_entities[ entityNum ].currentState.eType == ET_BUILDABLE && + BG_Buildable( cg_entities[ entityNum ].currentState.modelindex )->team == TEAM_ALIENS ) + { + // Alien buildables + sound = IMPACTSOUND_FLESH; + } + else + sound = IMPACTSOUND_DEFAULT; + + CG_MissileHitWall( weaponNum, weaponMode, 0, origin, dir, sound, charge ); + } } |