diff options
author | Roman Tetelman <kevlarman@gmail.com> | 2009-10-03 12:17:23 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:15:49 +0000 |
commit | 7992017f0570eb540fdc886e5d389f3121b7feae (patch) | |
tree | 5187808810d486cc205a831533b6c9d019c9dce2 /src | |
parent | 4b04c5ef971d12e258ca0b06f3bb0eb0cc453f06 (diff) |
* aliens were getting the wrong hitsound when attacking human buildables
Diffstat (limited to 'src')
-rw-r--r-- | src/cgame/cg_weapons.c | 20 | ||||
-rw-r--r-- | src/game/g_weapon.c | 2 |
2 files changed, 20 insertions, 2 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 ); + } } diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index d5eda5ab..beb91429 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -252,7 +252,7 @@ static void BloodSpurt( gentity_t *attacker, gentity_t *victim, trace_t *tr ) tent->s.eventParm = DirToByte( tr->plane.normal ); tent->s.weapon = attacker->s.weapon; tent->s.generic1 = attacker->s.generic1; // weaponMode - } +} /* =============== |