diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2015-04-04 19:19:40 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2015-04-04 19:19:40 +0200 |
commit | 5ef62f4e351371265ff96ad423332ab38a162a62 (patch) | |
tree | 0580c73e9599c3f2992eb735d3a220303ac5d022 /src/cgame/cg_draw.c | |
parent | dab8c5f5c46a2f32f1d6e63641bae816850f0cc6 (diff) | |
parent | d6fa5c74ba80688a3e14d2e099bfb6077323d079 (diff) |
Merge branch 'damage-feedback'
Diffstat (limited to 'src/cgame/cg_draw.c')
-rw-r--r-- | src/cgame/cg_draw.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index 09777b6..35c53cc 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -3879,6 +3879,20 @@ found_blob: blob->flags = flags; VectorCopy( origin, blob->origin ); VectorSet( blob->velocity, crandom( ) * 20, crandom( ) * 20, 100 ); + + if( cg_hitSounds.integer > 1 || + ( cg_hitSounds.integer == 1 && + ( flags & DAMAGE_BLOB_FRIENDLY ) ) ) + { + int index; + + if( flags & DAMAGE_BLOB_FRIENDLY ) + index = 4; + else + index = ( flags & ( DAMAGE_BLOB_SPLASH | DAMAGE_BLOB_BUILDABLE ) ); + + trap_S_StartLocalSound( cgs.media.hitSounds[ index ], CHAN_LOCAL_SOUND ); + } } static void CG_DrawNumber( float x, float y, float h, char *str ) |