diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 4c177be39..8e3682194 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -2122,7 +2122,9 @@ void C_DefineSound(int32_t sndidx, const char *fn, int32_t args[5]) snd->ps = args[0]; snd->pe = args[1]; snd->pr = args[2]; - snd->m = args[3]; + snd->m = args[3] & ~32; + if (args[3] & 1) + snd->m |= 32; snd->vo = args[4]; if (sndidx > g_maxSoundPos) @@ -5743,8 +5745,12 @@ repeatcase: g_sounds[k].pe = *(g_scriptPtr-1); C_GetNextValue(LABEL_DEFINE); g_sounds[k].pr = *(g_scriptPtr-1); + C_GetNextValue(LABEL_DEFINE); - g_sounds[k].m = *(g_scriptPtr-1); + g_sounds[k].m = *(g_scriptPtr-1) & ~32; + if (*(g_scriptPtr-1) & 1) + g_sounds[k].m |= 32; + C_GetNextValue(LABEL_DEFINE); g_sounds[k].vo = *(g_scriptPtr-1); g_scriptPtr -= 5; diff --git a/polymer/eduke32/source/sounds.c b/polymer/eduke32/source/sounds.c index 767811e5f..233d460a1 100644 --- a/polymer/eduke32/source/sounds.c +++ b/polymer/eduke32/source/sounds.c @@ -657,7 +657,7 @@ int32_t S_PlaySound3D(int32_t num, int32_t i, const vec3_t *pos) if (g_sounds[num].m&1) { - if (g_sounds[num].num > 0) + if ((g_sounds[num].m&32) && g_sounds[num].num > 0) { g_soundlocks[num]--; return -1;