mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-12 23:54:33 +00:00
- added a compatibility option for stopping sounds when the owning actor is destroyed.
This commit is contained in:
parent
fc40e9723a
commit
ef5707d73b
6 changed files with 6 additions and 1 deletions
|
@ -141,6 +141,7 @@ static FCompatOption Options[] =
|
||||||
{ "maskedmidtex", COMPATF_MASKEDMIDTEX, SLOT_COMPAT },
|
{ "maskedmidtex", COMPATF_MASKEDMIDTEX, SLOT_COMPAT },
|
||||||
{ "badangles", COMPATF2_BADANGLES, SLOT_COMPAT2 },
|
{ "badangles", COMPATF2_BADANGLES, SLOT_COMPAT2 },
|
||||||
{ "floormove", COMPATF2_FLOORMOVE, SLOT_COMPAT2 },
|
{ "floormove", COMPATF2_FLOORMOVE, SLOT_COMPAT2 },
|
||||||
|
{ "soundcutoff", COMPATF2_SOUNDCUTOFF, SLOT_COMPAT2 },
|
||||||
|
|
||||||
{ NULL, 0, 0 }
|
{ NULL, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
|
@ -620,6 +620,7 @@ CVAR (Flag, compat_polyobj, compatflags, COMPATF_POLYOBJ);
|
||||||
CVAR (Flag, compat_maskedmidtex, compatflags, COMPATF_MASKEDMIDTEX);
|
CVAR (Flag, compat_maskedmidtex, compatflags, COMPATF_MASKEDMIDTEX);
|
||||||
CVAR (Flag, compat_badangles, compatflags2, COMPATF2_BADANGLES);
|
CVAR (Flag, compat_badangles, compatflags2, COMPATF2_BADANGLES);
|
||||||
CVAR (Flag, compat_floormove, compatflags2, COMPATF2_FLOORMOVE);
|
CVAR (Flag, compat_floormove, compatflags2, COMPATF2_FLOORMOVE);
|
||||||
|
CVAR (Flag, compat_soundcutoff, compatflags2, COMPATF2_SOUNDCUTOFF);
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
|
|
|
@ -339,6 +339,7 @@ enum
|
||||||
|
|
||||||
COMPATF2_BADANGLES = 1 << 0, // It is impossible to face directly NSEW.
|
COMPATF2_BADANGLES = 1 << 0, // It is impossible to face directly NSEW.
|
||||||
COMPATF2_FLOORMOVE = 1 << 1, // Use the same floor motion behavior as Doom.
|
COMPATF2_FLOORMOVE = 1 << 1, // Use the same floor motion behavior as Doom.
|
||||||
|
COMPATF2_SOUNDCUTOFF = 1 << 2, // Cut off sounds when an actor vanishes instead of making it owner-less
|
||||||
};
|
};
|
||||||
|
|
||||||
// Emulate old bugs for select maps. These are not exposed by a cvar
|
// Emulate old bugs for select maps. These are not exposed by a cvar
|
||||||
|
|
|
@ -1306,6 +1306,7 @@ MapFlagHandlers[] =
|
||||||
{ "compat_maskedmidtex", MITYPE_COMPATFLAG, COMPATF_MASKEDMIDTEX, 0 },
|
{ "compat_maskedmidtex", MITYPE_COMPATFLAG, COMPATF_MASKEDMIDTEX, 0 },
|
||||||
{ "compat_badangles", MITYPE_COMPATFLAG, 0, COMPATF2_BADANGLES },
|
{ "compat_badangles", MITYPE_COMPATFLAG, 0, COMPATF2_BADANGLES },
|
||||||
{ "compat_floormove", MITYPE_COMPATFLAG, 0, COMPATF2_FLOORMOVE },
|
{ "compat_floormove", MITYPE_COMPATFLAG, 0, COMPATF2_FLOORMOVE },
|
||||||
|
{ "compat_soundcutoff", MITYPE_COMPATFLAG, 0, COMPATF2_SOUNDCUTOFF },
|
||||||
{ "cd_start_track", MITYPE_EATNEXT, 0, 0 },
|
{ "cd_start_track", MITYPE_EATNEXT, 0, 0 },
|
||||||
{ "cd_end1_track", MITYPE_EATNEXT, 0, 0 },
|
{ "cd_end1_track", MITYPE_EATNEXT, 0, 0 },
|
||||||
{ "cd_end2_track", MITYPE_EATNEXT, 0, 0 },
|
{ "cd_end2_track", MITYPE_EATNEXT, 0, 0 },
|
||||||
|
|
|
@ -1575,7 +1575,7 @@ void S_RelinkSound (AActor *from, AActor *to)
|
||||||
{
|
{
|
||||||
chan->Actor = to;
|
chan->Actor = to;
|
||||||
}
|
}
|
||||||
else if (!(chan->ChanFlags & CHAN_LOOP))
|
else if (!(chan->ChanFlags & CHAN_LOOP) && !(compatflags2 & COMPATF2_SOUNDCUTOFF))
|
||||||
{
|
{
|
||||||
chan->Actor = NULL;
|
chan->Actor = NULL;
|
||||||
chan->SourceType = SOURCE_Unattached;
|
chan->SourceType = SOURCE_Unattached;
|
||||||
|
|
|
@ -1300,6 +1300,7 @@ OptionMenu "CompatibilityOptions"
|
||||||
Option "Ignore Y offsets on masked midtextures", "compat_MASKEDMIDTEX", "YesNo"
|
Option "Ignore Y offsets on masked midtextures", "compat_MASKEDMIDTEX", "YesNo"
|
||||||
Option "Cannot travel straight NSEW", "compat_badangles", "YesNo"
|
Option "Cannot travel straight NSEW", "compat_badangles", "YesNo"
|
||||||
Option "Use Doom's floor motion behavior", "compat_floormove", "YesNo"
|
Option "Use Doom's floor motion behavior", "compat_floormove", "YesNo"
|
||||||
|
Option "Sounds stop when actor vanishes", "compat_soundcutoff", "YesNo"
|
||||||
|
|
||||||
Class "CompatibilityMenu"
|
Class "CompatibilityMenu"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue