Merge remote-tracking branch 'upstream/master' into fix/558_silenced_muzzle_flash

This commit is contained in:
Boris I. Bendovsky 2020-05-04 17:41:36 +03:00
commit 1887072cc9
No known key found for this signature in database
GPG key ID: 48CD539C0518594B
2 changed files with 19 additions and 5 deletions

View file

@ -30,7 +30,7 @@
#include "../../common/header/common.h"
#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__)
#if defined(__GLIBC__) || defined(__FreeBSD__) || defined(__APPLE__)
#include <execinfo.h>
void

View file

@ -862,11 +862,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;