summaryrefslogtreecommitdiff
path: root/src/cgame/cg_weapons.c
diff options
context:
space:
mode:
authorRoman Tetelman <kevlarman@gmail.com>2009-10-03 12:17:23 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:15:49 +0000
commit7992017f0570eb540fdc886e5d389f3121b7feae (patch)
tree5187808810d486cc205a831533b6c9d019c9dce2 /src/cgame/cg_weapons.c
parent4b04c5ef971d12e258ca0b06f3bb0eb0cc453f06 (diff)
* aliens were getting the wrong hitsound when attacking human buildables
Diffstat (limited to 'src/cgame/cg_weapons.c')
-rw-r--r--src/cgame/cg_weapons.c20
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 );
+ }
}