From 9a6459c9f301ccf21952b9c7140535ce51906b85 Mon Sep 17 00:00:00 2001 From: mittorn Date: Wed, 15 Aug 2018 02:14:32 +0700 Subject: [PATCH] Allow use = to send sound name instead of sentence group --- dlls/sound.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/sound.cpp b/dlls/sound.cpp index 2a7e144b..ff8d29ff 100644 --- a/dlls/sound.cpp +++ b/dlls/sound.cpp @@ -1185,6 +1185,13 @@ int SENTENCEG_PlayRndSz( edict_t *entity, const char *szgroupname, float volume, name[0] = 0; + // allow setting sound path + if( szgroupname[0] == '=' ) + { + EMIT_SOUND_DYN( entity, CHAN_VOICE, szgroupname + 1, volume, attenuation, flags, pitch ); + return -1; + } + isentenceg = SENTENCEG_GetIndex( szgroupname ); if( isentenceg < 0 ) {