diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index 16f761a3d..28fcf4698 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -606,7 +606,7 @@ void A_DeleteSprite(int32_t s) A_DeleteLight(s); #endif - if (sprite[s].picnum == MUSICANDSFX && actor[s].t_data[8]==1) + if (sprite[s].picnum == MUSICANDSFX && actor[s].t_data[0]==1) { // AMBIENT_SFX_PLAYING S_StopEnvSound(sprite[s].lotag, s); @@ -1417,15 +1417,14 @@ ACTOR_STATIC void G_MoveFX(void) g_sounds[s->lotag].m |= SF_LOOP; A_PlaySound(s->lotag,i); g_sounds[s->lotag].m = om; - T1 = 1; - T9 = 1; // AMBIENT_SFX_PLAYING + T1 = 1; // AMBIENT_SFX_PLAYING } else if (x >= ht && T1 == 1) { // Stop playing ambience sound because we're out of its range. + // T1 will be reset in sounds.c: CLEAR_SOUND_T0 // T1 = 0; - T9 = 0; S_StopEnvSound(s->lotag,i); } } diff --git a/polymer/eduke32/source/sounds.c b/polymer/eduke32/source/sounds.c index c23898893..0372bddfa 100644 --- a/polymer/eduke32/source/sounds.c +++ b/polymer/eduke32/source/sounds.c @@ -363,8 +363,8 @@ void S_Cleanup(void) g_sounds[num].num--; // MUSICANDSFX uses t_data[0] to control restarting the sound - // ST_2_UNDERWATER - if (i != -1 && S_IsAmbientSFX(i) && sector[sprite[i].sectnum].lotag < 3) + // CLEAR_SOUND_T0 + if (i != -1 && S_IsAmbientSFX(i) && sector[sprite[i].sectnum].lotag < 3) // ST_2_UNDERWATER actor[i].t_data[0] = 0; g_sounds[num].SoundOwner[j].ow = -1;