summaryrefslogtreecommitdiff
path: root/src/cgame/cg_draw.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cgame/cg_draw.c')
-rw-r--r--src/cgame/cg_draw.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c
index 8007bfe..2c9c400 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 )