Browse Source

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.
pull/2/head
Alibek Omarov 1 year ago
parent
commit
6df25392b8
  1. 7
      engine/server/sv_game.c

7
engine/server/sv_game.c

@ -2087,8 +2087,11 @@ int SV_BuildSoundMsg( sizebuf_t *msg, edict_t *ent, int chan, const char *sample @@ -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

Loading…
Cancel
Save