Sound code tweaks

git-svn-id: https://svn.eduke32.com/eduke32@6836 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2018-04-21 06:04:39 +00:00
parent 7a6e87e367
commit f952a77c9e
3 changed files with 6 additions and 4 deletions

View file

@ -6710,7 +6710,6 @@ MAIN_LOOP_RESTART:
quitevent = 0;
}
timerUpdate();
Net_GetPackets();
// only allow binds to function if the player is actually in a game (not in a menu, typing, et cetera) or demo
@ -6760,6 +6759,8 @@ MAIN_LOOP_RESTART:
Bmemcpy(&inputfifo[0][myconnectindex], &localInput, sizeof(input_t));
S_Update();
do
{
timerUpdate();

View file

@ -412,8 +412,6 @@ void Net_ReceiveDisconnect(ENetEvent *event)
void Net_GetPackets(void)
{
timerUpdate();
MUSIC_Update();
S_Update();
G_HandleSpecialKeys();

View file

@ -915,11 +915,14 @@ void S_Update(void)
do
{
if (g_sounds[num].num == 0)
continue;
for (bssize_t k=0; k<MAXSOUNDINSTANCES; ++k)
{
int32_t i = g_sounds[num].instances[k].spriteNum;
if ((unsigned)i >= MAXSPRITES || g_sounds[num].num == 0 || g_sounds[num].instances[k].voice <= FX_Ok ||
if ((unsigned)i >= MAXSPRITES || g_sounds[num].instances[k].voice <= FX_Ok ||
!FX_SoundActive(g_sounds[num].instances[k].voice))
continue;