mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-26 22:40:50 +00:00
Limit the new order of the pending sound lists to baseq2 and the addons.
The new ordering was introduced in 16ee007
, fixing some problems with
the wrong sound getting played when an entity triggers several sound at
the same timestamp. This broke the behavior of the mods, in #558 dday
was mentioned, muzzle flashe sound prevent the firing sound from getting
played.
Since we don't control the source of all mods, add a simple band aid
fix: Use the new ordering for baseq2, xatrix and rouge. Use the old
ordering for everything else.
An alternative approach is being discussed in #564.
This commit is contained in:
parent
1eca56a4a3
commit
8f2542e05f
1 changed files with 18 additions and 4 deletions
|
@ -722,11 +722,25 @@ S_StartSound(vec3_t origin, int entnum, int entchannel, sfx_t *sfx,
|
|||
}
|
||||
}
|
||||
|
||||
/* sort into the pending sound list */
|
||||
for (sort = s_pendingplays.next;
|
||||
sort != &s_pendingplays && sort->begin <= ps->begin;
|
||||
sort = sort->next)
|
||||
cvar_t *game = Cvar_Get("game", "", CVAR_LATCH | CVAR_SERVERINFO);
|
||||
|
||||
if ((strcmp(game->string, "") == 0) ||
|
||||
(strcmp(game->string, "rogue") == 0) ||
|
||||
(strcmp(game->string, "xatrix") == 0))
|
||||
{
|
||||
for (sort = s_pendingplays.next;
|
||||
sort != &s_pendingplays && sort->begin <= ps->begin;
|
||||
sort = sort->next)
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (sort = s_pendingplays.next;
|
||||
sort != &s_pendingplays && sort->begin < ps->begin;
|
||||
sort = sort->next)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
ps->next = sort;
|
||||
|
|
Loading…
Reference in a new issue