mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-24 04:29:34 -04:00
Fix plat infinite sound loop (#825)
This commit is contained in:
parent
c7e09871dd
commit
84aa5955d0
@ -368,6 +368,7 @@ int EV_StopPlat(line_t* line)
|
|||||||
plat_t *plat = pl->plat; // for one with the tag not in stasis
|
plat_t *plat = pl->plat; // for one with the tag not in stasis
|
||||||
if (plat->status != in_stasis && plat->tag == line->tag)
|
if (plat->status != in_stasis && plat->tag == line->tag)
|
||||||
{
|
{
|
||||||
|
S_StopLoop((mobj_t *)&plat->sector->soundorg);
|
||||||
plat->oldstatus = plat->status; // put it in stasis
|
plat->oldstatus = plat->status; // put it in stasis
|
||||||
plat->status = in_stasis;
|
plat->status = in_stasis;
|
||||||
plat->thinker.function.v = NULL;
|
plat->thinker.function.v = NULL;
|
||||||
|
@ -488,6 +488,27 @@ void S_StopSound(const mobj_t *origin)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// S_StopLoop
|
||||||
|
//
|
||||||
|
void S_StopLoop(const mobj_t *origin)
|
||||||
|
{
|
||||||
|
int cnum;
|
||||||
|
|
||||||
|
//jff 1/22/98 return if sound is not enabled
|
||||||
|
if(nosfxparm)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for(cnum = 0; cnum < numChannels; ++cnum)
|
||||||
|
{
|
||||||
|
if(channels[cnum].sfxinfo && channels[cnum].origin == origin && channels[cnum].loop)
|
||||||
|
{
|
||||||
|
S_StopChannel(cnum);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// [FG] play sounds in full length
|
// [FG] play sounds in full length
|
||||||
boolean full_sounds;
|
boolean full_sounds;
|
||||||
// [FG] removed map objects may finish their sounds
|
// [FG] removed map objects may finish their sounds
|
||||||
|
@ -54,6 +54,7 @@ void S_LoopSound(const mobj_t *origin, int sound_id);
|
|||||||
|
|
||||||
// Stop sound for thing at <origin>
|
// Stop sound for thing at <origin>
|
||||||
void S_StopSound(const mobj_t *origin);
|
void S_StopSound(const mobj_t *origin);
|
||||||
|
void S_StopLoop(const mobj_t *origin);
|
||||||
void S_StopLoopSounds(void);
|
void S_StopLoopSounds(void);
|
||||||
|
|
||||||
// [FG] play sounds in full length
|
// [FG] play sounds in full length
|
||||||
|
Loading…
x
Reference in New Issue
Block a user