diff --git a/src/compatibility.cpp b/src/compatibility.cpp index 0b27a1efa..a1fb2701a 100644 --- a/src/compatibility.cpp +++ b/src/compatibility.cpp @@ -151,7 +151,7 @@ static FCompatOption Options[] = { "multiexit", COMPATF2_MULTIEXIT, SLOT_COMPAT2 }, { "teleport", COMPATF2_TELEPORT, SLOT_COMPAT2 }, { "disablepushwindowcheck", COMPATF2_PUSHWINDOW, SLOT_COMPAT2 }, - + { "clipmidtex", COMPATF2_CLIPMIDTEX, SLOT_COMPAT2 }, { NULL, 0, 0 } }; diff --git a/src/d_main.cpp b/src/d_main.cpp index a30641d60..1ecc62fd0 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -641,6 +641,7 @@ CVAR (Flag, compat_pointonline, compatflags2, COMPATF2_POINTONLINE); CVAR (Flag, compat_multiexit, compatflags2, COMPATF2_MULTIEXIT); CVAR (Flag, compat_teleport, compatflags2, COMPATF2_TELEPORT); CVAR (Flag, compat_pushwindow, compatflags2, COMPATF2_PUSHWINDOW); +CVAR (Flag, compat_clipmidtex, compatflags2, COMPATF2_CLIPMIDTEX); //========================================================================== // diff --git a/src/doomdef.h b/src/doomdef.h index 5a1d1f95f..d8116fb02 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -344,6 +344,7 @@ enum : unsigned int COMPATF2_MULTIEXIT = 1 << 4, // Level exit can be triggered multiple times (required by Daedalus's travel tubes, thanks to a faulty script) COMPATF2_TELEPORT = 1 << 5, // Don't let indirect teleports trigger sector actions COMPATF2_PUSHWINDOW = 1 << 6, // Disable the window check in CheckForPushSpecial() + COMPATF2_CLIPMIDTEX = 1 << 7, // Always Clip midtex's in the software renderer (required to run certain GZDoom maps) }; // Emulate old bugs for select maps. These are not exposed by a cvar diff --git a/src/g_mapinfo.cpp b/src/g_mapinfo.cpp index f83e18ece..19eb692c7 100644 --- a/src/g_mapinfo.cpp +++ b/src/g_mapinfo.cpp @@ -1330,6 +1330,7 @@ MapFlagHandlers[] = { "compat_multiexit", MITYPE_COMPATFLAG, 0, COMPATF2_MULTIEXIT }, { "compat_teleport", MITYPE_COMPATFLAG, 0, COMPATF2_TELEPORT }, { "compat_pushwindow", MITYPE_COMPATFLAG, 0, COMPATF2_PUSHWINDOW }, + { "compat_clipmidtex", MITYPE_COMPATFLAG, 0, COMPATF2_CLIPMIDTEX }, { "cd_start_track", MITYPE_EATNEXT, 0, 0 }, { "cd_end1_track", MITYPE_EATNEXT, 0, 0 }, { "cd_end2_track", MITYPE_EATNEXT, 0, 0 }, diff --git a/src/p_setup.cpp b/src/p_setup.cpp index ac7faea76..59cbfdf36 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -2176,7 +2176,8 @@ void P_LoadLineDefs (MapData * map) P_AdjustLine (ld); P_SaveLineSpecial (ld); - if (level.flags2 & LEVEL2_CLIPMIDTEX) ld->flags |= ML_CLIP_MIDTEX; + if ((level.flags2 & LEVEL2_CLIPMIDTEX) || (ii_compatflags2 & COMPATF2_CLIPMIDTEX)) + ld->flags |= ML_CLIP_MIDTEX; if (level.flags2 & LEVEL2_WRAPMIDTEX) ld->flags |= ML_WRAP_MIDTEX; if (level.flags2 & LEVEL2_CHECKSWITCHRANGE) ld->flags |= ML_CHECKSWITCHRANGE; } @@ -2262,7 +2263,8 @@ void P_LoadLineDefs2 (MapData * map) P_AdjustLine (ld); P_SetLineID(i, ld); P_SaveLineSpecial (ld); - if (level.flags2 & LEVEL2_CLIPMIDTEX) ld->flags |= ML_CLIP_MIDTEX; + if ((level.flags2 & LEVEL2_CLIPMIDTEX) || (ii_compatflags2 & COMPATF2_CLIPMIDTEX)) + ld->flags |= ML_CLIP_MIDTEX; if (level.flags2 & LEVEL2_WRAPMIDTEX) ld->flags |= ML_WRAP_MIDTEX; if (level.flags2 & LEVEL2_CHECKSWITCHRANGE) ld->flags |= ML_CHECKSWITCHRANGE; diff --git a/src/p_udmf.cpp b/src/p_udmf.cpp index fc71160ae..4ae40d565 100644 --- a/src/p_udmf.cpp +++ b/src/p_udmf.cpp @@ -838,7 +838,8 @@ public: ld->portalindex = UINT_MAX; ld->portaltransferred = UINT_MAX; ld->sidedef[0] = ld->sidedef[1] = NULL; - if (level.flags2 & LEVEL2_CLIPMIDTEX) ld->flags |= ML_CLIP_MIDTEX; + if ((level.flags2 & LEVEL2_CLIPMIDTEX) || (ii_compatflags2 & COMPATF2_CLIPMIDTEX)) + ld->flags |= ML_CLIP_MIDTEX; if (level.flags2 & LEVEL2_WRAPMIDTEX) ld->flags |= ML_WRAP_MIDTEX; if (level.flags2 & LEVEL2_CHECKSWITCHRANGE) ld->flags |= ML_CHECKSWITCHRANGE; diff --git a/wadsrc/static/compatibility.txt b/wadsrc/static/compatibility.txt index 020d8477d..4750a2bdf 100644 --- a/wadsrc/static/compatibility.txt +++ b/wadsrc/static/compatibility.txt @@ -510,3 +510,28 @@ ABC4EB5A1535ECCD0061AD14F3547908 // Plutonia Experiment, map26 setlinespecial 2410 Sector_Set3DFloor 32002 4 1 0 0 } +1ED329858AB154C55878DA1C11A4F100 // unloved.pk3:unlovedmaps.wad map01 +{ + clipmidtex +} + +FA23E72FA955E66EC68609F72C0BA71E // unloved.pk3:unlovedmaps.wad map02 +{ + clipmidtex +} + +41BEC1F643CFEEC997AF98276A05EC88 // unloved.pk3:unlovedmaps.wad map03 +{ + clipmidtex +} + +AF9A6370BE562584BC11165ECF364713 // unloved.pk3:unlovedmaps.wad map04 +{ + clipmidtex +} + +DC96228097DD004C40CCB1DB14A91EAA // unloved.pk3:unlovedmaps.wad map05 +{ + clipmidtex +} +