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 2 years 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
} }
else else
{ {
// TESTTEST // '*' is special symbol to handle stream sounds
if( *sample == '*' ) chan = CHAN_AUTO; // (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 // precache_sound can be used twice: cache sounds when loading
// and return sound index when server is active // and return sound index when server is active

Loading…
Cancel
Save