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-10 19:13:07 +01:00
1 parent 821c061f82
commit 59ff5e61bf
2 files changed
+1 -8

No files matched your search

-2
View File
@@ -812,8 +812,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
@@ -772,14 +772,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;