Revert "Fix use-after-free when mobj is removed while still playing sounds"

This reverts commit 3bdc745bd1.
This commit is contained in:
Alug committed 2025-12-11 02:58:45 +01:00
1 parent 87923973e3
commit 461f3e6bf5
2 files changed
+1 -8

No files matched your search

-2
View File
@@ -815,8 +815,6 @@ static void P_LoadSectors(UINT8 *data)
ss->tag = SHORT(ms->tag);
ss->flags |= SF_FLIPSPECIAL_FLOOR;
ss->soundorg.thinker.function = (actionf_p1)P_MobjThinker;
}
// set the sky flat num
+1 -6
View File
@@ -776,14 +776,9 @@ void S_UpdateSounds(void)
volume = c->volume; // 8 bits internal volume precision
sep = NORM_SEP;
if (P_MobjWasRemoved(c->origin))
{
// origin was removed, stop the music
S_StopChannel(cnum);
}
// check non-local sounds for distance clipping
// or modify their params
else
if (c->origin)
{
boolean itsUs = false;