- added a compatibility option to allow multiple exits to be triggered.

This is required by Daedalus's travel tubes which contain a faulty script with some leftover debug code.
This commit is contained in:
Christoph Oelckers 2016-02-24 10:35:29 +01:00
parent b01e0fa06e
commit 51da78ba29
8 changed files with 14 additions and 2 deletions

View file

@ -146,6 +146,7 @@ static FCompatOption Options[] =
{ "floormove", COMPATF2_FLOORMOVE, SLOT_COMPAT2 }, { "floormove", COMPATF2_FLOORMOVE, SLOT_COMPAT2 },
{ "soundcutoff", COMPATF2_SOUNDCUTOFF, SLOT_COMPAT2 }, { "soundcutoff", COMPATF2_SOUNDCUTOFF, SLOT_COMPAT2 },
{ "pointonline", COMPATF2_POINTONLINE, SLOT_COMPAT2 }, { "pointonline", COMPATF2_POINTONLINE, SLOT_COMPAT2 },
{ "multiexit", COMPATF2_MULTIEXIT, SLOT_COMPAT2 },
{ NULL, 0, 0 } { NULL, 0, 0 }
}; };

View file

@ -572,7 +572,8 @@ CUSTOM_CVAR(Int, compatmode, 0, CVAR_ARCHIVE|CVAR_NOINITCALL)
break; break;
case 4: // Old ZDoom compat mode case 4: // Old ZDoom compat mode
v = COMPATF_SOUNDTARGET|COMPATF_LIGHT; v = COMPATF_SOUNDTARGET | COMPATF_LIGHT;
w = COMPATF2_MULTIEXIT;
break; break;
case 5: // MBF compat mode case 5: // MBF compat mode
@ -627,6 +628,7 @@ 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); CVAR (Flag, compat_soundcutoff, compatflags2, COMPATF2_SOUNDCUTOFF);
CVAR (Flag, compat_pointonline, compatflags2, COMPATF2_POINTONLINE); CVAR (Flag, compat_pointonline, compatflags2, COMPATF2_POINTONLINE);
CVAR (Flag, compat_multiexit, compatflags2, COMPATF2_MULTIEXIT);
//========================================================================== //==========================================================================
// //

View file

@ -341,6 +341,7 @@ enum
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 COMPATF2_SOUNDCUTOFF = 1 << 2, // Cut off sounds when an actor vanishes instead of making it owner-less
COMPATF2_POINTONLINE = 1 << 3, // Use original but buggy P_PointOnLineSide() and P_PointOnDivlineSide() COMPATF2_POINTONLINE = 1 << 3, // Use original but buggy P_PointOnLineSide() and P_PointOnDivlineSide()
COMPATF2_MULTIEXIT = 1 << 4, // Level exit can be triggered multiple times (required by Daedalus's travel tubes, thanks to a faulty script)
}; };
// 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

View file

@ -535,7 +535,7 @@ void G_ChangeLevel(const char *levelname, int position, int flags, int nextSkill
Printf (TEXTCOLOR_RED "Unloading scripts cannot exit the level again.\n"); Printf (TEXTCOLOR_RED "Unloading scripts cannot exit the level again.\n");
return; return;
} }
if (gameaction == ga_completed) // do not exit multiple times. if (gameaction == ga_completed && !(i_compatflags2 & COMPATF2_MULTIEXIT)) // do not exit multiple times.
{ {
return; return;
} }

View file

@ -1328,6 +1328,7 @@ MapFlagHandlers[] =
{ "compat_floormove", MITYPE_COMPATFLAG, 0, COMPATF2_FLOORMOVE }, { "compat_floormove", MITYPE_COMPATFLAG, 0, COMPATF2_FLOORMOVE },
{ "compat_soundcutoff", MITYPE_COMPATFLAG, 0, COMPATF2_SOUNDCUTOFF }, { "compat_soundcutoff", MITYPE_COMPATFLAG, 0, COMPATF2_SOUNDCUTOFF },
{ "compat_pointonline", MITYPE_COMPATFLAG, 0, COMPATF2_POINTONLINE }, { "compat_pointonline", MITYPE_COMPATFLAG, 0, COMPATF2_POINTONLINE },
{ "compat_multiexit", MITYPE_COMPATFLAG, 0, COMPATF2_MULTIEXIT },
{ "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 },

View file

@ -411,6 +411,11 @@ D0139194F7817BF06F3988DFC47DB38D // Whispers of Satan map29
nopassover nopassover
} }
5397C3B7D9B33AAF526D15A81A762828 // daedalus.wad Travel tubes (they are all identical)
{
multiexit
}
D7F6E9F08C39A17026349A04F8C0B0BE // Return to Hadron, e1m9 D7F6E9F08C39A17026349A04F8C0B0BE // Return to Hadron, e1m9
19D03FFC875589E21EDBB7AB74EF4AEF // Return to Hadron, e1m9, 2016.01.03 update 19D03FFC875589E21EDBB7AB74EF4AEF // Return to Hadron, e1m9, 2016.01.03 update
{ {

View file

@ -2035,6 +2035,7 @@ CMPTMNU_SHORTTEX = "Find shortest textures like Doom";
CMPTMNU_STAIRS = "Use buggier stair building"; CMPTMNU_STAIRS = "Use buggier stair building";
CMPTMNU_FLOORMOVE = "Use Doom's floor motion behavior"; CMPTMNU_FLOORMOVE = "Use Doom's floor motion behavior";
CMPTMNU_POINTONLINE = "Use Doom's point-on-line algorithm"; CMPTMNU_POINTONLINE = "Use Doom's point-on-line algorithm";
CMPTMNU_MULTIEXIT = "Level exit can be triggered more than once."
CMPTMNU_PHYSICSBEHAVIOR = "Physics Behavior"; CMPTMNU_PHYSICSBEHAVIOR = "Physics Behavior";
CMPTMNU_NOPASSOVER = "Actors are infinitely tall"; CMPTMNU_NOPASSOVER = "Actors are infinitely tall";
CMPTMNU_BOOMSCROLL = "Boom scrollers are additive"; CMPTMNU_BOOMSCROLL = "Boom scrollers are additive";

View file

@ -1304,6 +1304,7 @@ OptionMenu "CompatibilityOptions"
Option "$CMPTMNU_STAIRS", "compat_stairs", "YesNo" Option "$CMPTMNU_STAIRS", "compat_stairs", "YesNo"
Option "$CMPTMNU_FLOORMOVE", "compat_floormove", "YesNo" Option "$CMPTMNU_FLOORMOVE", "compat_floormove", "YesNo"
Option "$CMPTMNU_POINTONLINE", "compat_pointonline", "YesNo" Option "$CMPTMNU_POINTONLINE", "compat_pointonline", "YesNo"
Option "$CMPTMNU_MULTIEXIT", "compat_multiexit", "YesNo"
StaticText " " StaticText " "
StaticText "$CMPTMNU_PHYSICSBEHAVIOR",1 StaticText "$CMPTMNU_PHYSICSBEHAVIOR",1