mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- added a 'no MBF21' compatibility flag.
Turns out that there's a few old maps that have the extended line flags set but not the guard bit that forces their clearance. Astrostein 1's first map is an example for this.
This commit is contained in:
parent
396bac5e4f
commit
c48de5d8d3
10 changed files with 263 additions and 249 deletions
|
@ -588,7 +588,7 @@ CUSTOM_CVAR(Int, compatmode, 0, CVAR_ARCHIVE|CVAR_NOINITCALL)
|
|||
v = COMPATF_SHORTTEX | COMPATF_STAIRINDEX | COMPATF_USEBLOCKING | COMPATF_NODOORLIGHT | COMPATF_SPRITESORT |
|
||||
COMPATF_TRACE | COMPATF_MISSILECLIP | COMPATF_SOUNDTARGET | COMPATF_DEHHEALTH | COMPATF_CROSSDROPOFF |
|
||||
COMPATF_LIGHT | COMPATF_MASKEDMIDTEX;
|
||||
w = COMPATF2_FLOORMOVE | COMPATF2_EXPLODE1;
|
||||
w = COMPATF2_FLOORMOVE | COMPATF2_EXPLODE1 | COMPATF2_NOMBF21;
|
||||
break;
|
||||
|
||||
case 2: // same as 1 but stricter (NO_PASSMOBJ and INVISIBILITY are also set)
|
||||
|
@ -596,36 +596,36 @@ CUSTOM_CVAR(Int, compatmode, 0, CVAR_ARCHIVE|CVAR_NOINITCALL)
|
|||
COMPATF_TRACE | COMPATF_MISSILECLIP | COMPATF_SOUNDTARGET | COMPATF_NO_PASSMOBJ | COMPATF_LIMITPAIN |
|
||||
COMPATF_DEHHEALTH | COMPATF_INVISIBILITY | COMPATF_CROSSDROPOFF | COMPATF_CORPSEGIBS | COMPATF_HITSCAN |
|
||||
COMPATF_WALLRUN | COMPATF_NOTOSSDROPS | COMPATF_LIGHT | COMPATF_MASKEDMIDTEX;
|
||||
w = COMPATF2_BADANGLES | COMPATF2_FLOORMOVE | COMPATF2_POINTONLINE | COMPATF2_EXPLODE2;
|
||||
w = COMPATF2_BADANGLES | COMPATF2_FLOORMOVE | COMPATF2_POINTONLINE | COMPATF2_EXPLODE2 | COMPATF2_NOMBF21;
|
||||
break;
|
||||
|
||||
case 3: // Boom compat mode
|
||||
v = COMPATF_TRACE|COMPATF_SOUNDTARGET|COMPATF_BOOMSCROLL|COMPATF_MISSILECLIP|COMPATF_MASKEDMIDTEX;
|
||||
w = COMPATF2_EXPLODE1;
|
||||
w = COMPATF2_EXPLODE1 | COMPATF2_NOMBF21;
|
||||
break;
|
||||
|
||||
case 4: // Old ZDoom compat mode
|
||||
v = COMPATF_SOUNDTARGET | COMPATF_LIGHT;
|
||||
w = COMPATF2_MULTIEXIT | COMPATF2_TELEPORT | COMPATF2_PUSHWINDOW | COMPATF2_CHECKSWITCHRANGE;
|
||||
w = COMPATF2_MULTIEXIT | COMPATF2_TELEPORT | COMPATF2_PUSHWINDOW | COMPATF2_CHECKSWITCHRANGE | COMPATF2_NOMBF21;
|
||||
break;
|
||||
|
||||
case 5: // MBF compat mode
|
||||
v = COMPATF_TRACE | COMPATF_SOUNDTARGET | COMPATF_BOOMSCROLL | COMPATF_MISSILECLIP | COMPATF_MUSHROOM |
|
||||
COMPATF_MBFMONSTERMOVE | COMPATF_NOBLOCKFRIENDS | COMPATF_MASKEDMIDTEX;
|
||||
w = COMPATF2_EXPLODE1 | COMPATF2_AVOID_HAZARDS | COMPATF2_STAYONLIFT;
|
||||
w = COMPATF2_EXPLODE1 | COMPATF2_AVOID_HAZARDS | COMPATF2_STAYONLIFT | COMPATF2_NOMBF21;
|
||||
break;
|
||||
|
||||
case 6: // Boom with some added settings to reenable some 'broken' behavior
|
||||
v = COMPATF_TRACE | COMPATF_SOUNDTARGET | COMPATF_BOOMSCROLL | COMPATF_MISSILECLIP | COMPATF_NO_PASSMOBJ |
|
||||
COMPATF_INVISIBILITY | COMPATF_CORPSEGIBS | COMPATF_HITSCAN | COMPATF_WALLRUN | COMPATF_NOTOSSDROPS | COMPATF_MASKEDMIDTEX;
|
||||
w = COMPATF2_POINTONLINE | COMPATF2_EXPLODE2;
|
||||
w = COMPATF2_POINTONLINE | COMPATF2_EXPLODE2 | COMPATF2_NOMBF21;
|
||||
break;
|
||||
|
||||
case 7: // Stricter MBF compatibility
|
||||
v = COMPATF_CORPSEGIBS | COMPATF_NOBLOCKFRIENDS | COMPATF_MBFMONSTERMOVE | COMPATF_INVISIBILITY |
|
||||
COMPATF_NOTOSSDROPS | COMPATF_MUSHROOM | COMPATF_NO_PASSMOBJ | COMPATF_BOOMSCROLL | COMPATF_WALLRUN |
|
||||
COMPATF_TRACE | COMPATF_HITSCAN | COMPATF_MISSILECLIP | COMPATF_MASKEDMIDTEX | COMPATF_SOUNDTARGET;
|
||||
w = COMPATF2_POINTONLINE | COMPATF2_EXPLODE1 | COMPATF2_EXPLODE2 | COMPATF2_AVOID_HAZARDS | COMPATF2_STAYONLIFT;
|
||||
w = COMPATF2_POINTONLINE | COMPATF2_EXPLODE1 | COMPATF2_EXPLODE2 | COMPATF2_AVOID_HAZARDS | COMPATF2_STAYONLIFT | COMPATF2_NOMBF21;
|
||||
break;
|
||||
}
|
||||
compatflags = v;
|
||||
|
@ -677,6 +677,7 @@ CVAR (Flag, compat_explode2, compatflags2, COMPATF2_EXPLODE2);
|
|||
CVAR (Flag, compat_railing, compatflags2, COMPATF2_RAILING);
|
||||
CVAR (Flag, compat_avoidhazard, compatflags2, COMPATF2_AVOID_HAZARDS);
|
||||
CVAR (Flag, compat_stayonlift, compatflags2, COMPATF2_STAYONLIFT);
|
||||
CVAR (Flag, compat_nombf21, compatflags2, COMPATF2_NOMBF21);
|
||||
|
||||
CVAR(Bool, vid_activeinbackground, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
|
||||
|
|
|
@ -224,6 +224,7 @@ enum : unsigned int
|
|||
COMPATF2_SCRIPTWAIT = 1 << 11, // Use old scriptwait implementation where it doesn't wait on a non-running script.
|
||||
COMPATF2_AVOID_HAZARDS = 1 << 12, // another MBF thing.
|
||||
COMPATF2_STAYONLIFT = 1 << 13, // yet another MBF thing.
|
||||
COMPATF2_NOMBF21 = 1 << 14, // disable MBF21 features that may clash with certain maps
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -597,6 +597,12 @@ public:
|
|||
return p->camera == mo;
|
||||
}
|
||||
|
||||
bool MBF21Enabled() const
|
||||
{
|
||||
// The affected features only are a problem with Doom format maps - the flag should have no effect in Hexen and UDMF format.
|
||||
return !(i_compatflags2 & COMPATF2_NOMBF21) || maptype != MAPTYPE_DOOM;
|
||||
}
|
||||
|
||||
int NumMapSections;
|
||||
|
||||
uint32_t flags;
|
||||
|
|
|
@ -1706,6 +1706,7 @@ MapFlagHandlers[] =
|
|||
{ "compat_scriptwait", MITYPE_COMPATFLAG, 0, COMPATF2_SCRIPTWAIT },
|
||||
{ "compat_avoidhazards", MITYPE_COMPATFLAG, 0, COMPATF2_AVOID_HAZARDS },
|
||||
{ "compat_stayonlift", MITYPE_COMPATFLAG, 0, COMPATF2_STAYONLIFT },
|
||||
{ "compat_nombf21", MITYPE_COMPATFLAG, 0, COMPATF2_NOMBF21 },
|
||||
{ "cd_start_track", MITYPE_EATNEXT, 0, 0 },
|
||||
{ "cd_end1_track", MITYPE_EATNEXT, 0, 0 },
|
||||
{ "cd_end2_track", MITYPE_EATNEXT, 0, 0 },
|
||||
|
|
|
@ -169,6 +169,7 @@ static FCompatOption Options[] =
|
|||
{ "explode2", COMPATF2_EXPLODE2, SLOT_COMPAT2 },
|
||||
{ "railing", COMPATF2_RAILING, SLOT_COMPAT2 },
|
||||
{ "scriptwait", COMPATF2_SCRIPTWAIT, SLOT_COMPAT2 },
|
||||
{ "nombf21", COMPATF2_NOMBF21, SLOT_COMPAT2 },
|
||||
{ NULL, 0, 0 }
|
||||
};
|
||||
|
||||
|
|
|
@ -484,11 +484,12 @@ void MapLoader::InitSectorSpecial(sector_t *sector, int special)
|
|||
{
|
||||
sector->Flags |= SECF_PUSH;
|
||||
}
|
||||
if (sector->special & KILL_MONSTERS_MASK)
|
||||
// Nom MBF21 compatibility needs to be checked here, because after this point there is no longer any context in which it can be done.
|
||||
if ((sector->special & KILL_MONSTERS_MASK) && Level->MBF21Enabled())
|
||||
{
|
||||
sector->Flags |= SECF_KILLMONSTERS;
|
||||
}
|
||||
if (!(sector->special & DEATH_MASK))
|
||||
if (!(sector->special & DEATH_MASK) || !Level->MBF21Enabled())
|
||||
{
|
||||
if ((sector->special & DAMAGE_MASK) == 0x100)
|
||||
{
|
||||
|
|
|
@ -197,11 +197,11 @@ inline bool P_IsBlockedByLine(AActor* actor, line_t* line)
|
|||
// the regular 'blockmonsters' flag.
|
||||
if (line->flags & ML_BLOCKMONSTERS) return true;
|
||||
// MBF21's flag for walking monsters
|
||||
if ((line->flags2 & ML2_BLOCKLANDMONSTERS) && !(actor->flags & MF_FLOAT)) return true;
|
||||
if ((line->flags2 & ML2_BLOCKLANDMONSTERS) && actor->Level->MBF21Enabled() && !(actor->flags & MF_FLOAT)) return true;
|
||||
}
|
||||
|
||||
// Blocking players
|
||||
if (((actor->player != nullptr) || (actor->flags8 & MF8_BLOCKASPLAYER)) && (line->flags & ML_BLOCK_PLAYERS)) return true;
|
||||
if ((((actor->player != nullptr) || (actor->flags8 & MF8_BLOCKASPLAYER)) && (line->flags & ML_BLOCK_PLAYERS)) && actor->Level->MBF21Enabled()) return true;
|
||||
|
||||
// Blocking floaters.
|
||||
if ((actor->flags & MF_FLOAT) && (line->flags & ML_BLOCK_FLOATERS)) return true;
|
||||
|
|
|
@ -105,6 +105,10 @@ A81E2734F735A82720D8E0F1442BA0C9 // Imp's [sic] are Ghost Gods map01
|
|||
|
||||
// invert the sorting order of overlapping sprites at the same spot
|
||||
551D6B416EB3324790BC0F0F74B49600 // Strain map13
|
||||
{
|
||||
spritesort
|
||||
}
|
||||
|
||||
2F49C29691F8565F0B99B27FCF2627E6 // Astrostein 1 MAP01
|
||||
55A741F9C2955C2B06F2387E45ED6C62 // MAP02
|
||||
4E7286B735671A942C54FAC6CB52A8C3 // MAP03
|
||||
|
@ -133,6 +137,7 @@ AB1A6C1D3898D4259C0645306939374C // map15
|
|||
CA267398C9B3A8F79349D3394F8B2106 // map20
|
||||
{
|
||||
spritesort
|
||||
nombf21
|
||||
}
|
||||
|
||||
1D9E43988940CCD3555724E15DD8B1AB // Happy Time Circus map01 has bad teleporters
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1776,6 +1776,7 @@ OptionMenu "CompatMapMenu" protected
|
|||
Option "$CMPTMNU_PUSHWINDOW", "compat_pushwindow", "YesNo"
|
||||
Option "$CMPTMNU_CHECKSWITCHRANGE", "compat_checkswitchrange", "YesNo"
|
||||
Option "$CMPTMNU_RAILINGHACK", "compat_railing", "YesNo"
|
||||
Option "$CMPTMNU_NOMBF21", "compat_nombf21", "YeaNo"
|
||||
Class "CompatibilityMenu"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue