engine: server: redirect special sounds, detected by leading asterisk, into CHAN_STREAM

In GoldSrc this magic symbol means that we should not override channel this
sound is playing on. Originally handled on client but for both static and dynamic sounds
so let's redirect channel on server side instead.
This commit is contained in:
Alibek Omarov 2023-01-27 06:16:47 +03:00
parent 327372e253
commit 6df25392b8

View File

@ -2087,8 +2087,11 @@ int SV_BuildSoundMsg( sizebuf_t *msg, edict_t *ent, int chan, const char *sample
}
else
{
// TESTTEST
if( *sample == '*' ) chan = CHAN_AUTO;
// '*' is special symbol to handle stream sounds
// (CHAN_VOICE but cannot be overriden)
// originally handled on client side
if( *sample == '*' )
chan = CHAN_STREAM;
// precache_sound can be used twice: cache sounds when loading
// and return sound index when server is active