mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Amend r3822 ("Make deletion of an amb. sound MUSICANDSFX stop its sound again.")
We shouldn't be using its actor[].t_data[8] because that one is used by the sprite rotation-fixing system (which fixes STAT_FX sprites to the positions relative to the pivot, too). Test case source/lunatic/test/delmusicsfx.lua still passes with this modification. git-svn-id: https://svn.eduke32.com/eduke32@4352 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
b8bd2069ea
commit
f077d57547
2 changed files with 5 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue