diff --git a/src/compatibility.cpp b/src/compatibility.cpp index 95d178635..2a721c33f 100644 --- a/src/compatibility.cpp +++ b/src/compatibility.cpp @@ -131,6 +131,7 @@ static FCompatOption Options[] = { "polyobj", COMPATF_POLYOBJ, SLOT_COMPAT }, { "maskedmidtex", COMPATF_MASKEDMIDTEX, SLOT_COMPAT }, { "badangles", COMPATF2_BADANGLES, SLOT_COMPAT2 }, + { "floormove", COMPATF2_FLOORMOVE, SLOT_COMPAT2 }, { NULL, 0, 0 } }; diff --git a/src/d_main.cpp b/src/d_main.cpp index 632a6729a..b3c8f5f56 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -562,6 +562,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; + w= COMPATF2_FLOORMOVE; break; case 2: // same as 1 but stricter (NO_PASSMOBJ and INVISIBILITY are also set) @@ -569,7 +570,7 @@ 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; + w = COMPATF2_BADANGLES|COMPATF2_FLOORMOVE; break; case 3: // Boom compat mode @@ -628,6 +629,7 @@ CVAR (Flag, compat_light, compatflags, COMPATF_LIGHT); CVAR (Flag, compat_polyobj, compatflags, COMPATF_POLYOBJ); CVAR (Flag, compat_maskedmidtex, compatflags, COMPATF_MASKEDMIDTEX); CVAR (Flag, compat_badangles, compatflags2, COMPATF2_BADANGLES); +CVAR (Flag, compat_floormove, compatflags2, COMPATF2_FLOORMOVE); //========================================================================== // diff --git a/src/doomdef.h b/src/doomdef.h index 538f084d7..114f8c701 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -336,6 +336,7 @@ enum COMPATF_MASKEDMIDTEX = 1 << 31, // Ignore compositing when drawing masked midtextures COMPATF2_BADANGLES = 1 << 0, // It is impossible to face directly NSEW. + COMPATF2_FLOORMOVE = 1 << 1, // Use the same floor motion behavior as Doom. }; // Emulate old bugs for select maps. These are not exposed by a cvar diff --git a/src/dsectoreffect.cpp b/src/dsectoreffect.cpp index e474bb841..6732a19dc 100644 --- a/src/dsectoreffect.cpp +++ b/src/dsectoreffect.cpp @@ -223,7 +223,7 @@ DMover::EResult DMover::MovePlane (fixed_t speed, fixed_t dest, int crush, //destheight = (dest < m_Sector->ceilingheight) ? dest : m_Sector->ceilingheight; if ((m_Sector->ceilingplane.a | m_Sector->ceilingplane.b | m_Sector->floorplane.a | m_Sector->floorplane.b) == 0 && - -dest > m_Sector->ceilingplane.d) + (!(i_compatflags2 & COMPATF2_FLOORMOVE) && -dest > m_Sector->ceilingplane.d)) { dest = -m_Sector->ceilingplane.d; } @@ -292,7 +292,7 @@ DMover::EResult DMover::MovePlane (fixed_t speed, fixed_t dest, int crush, //destheight = (dest > m_Sector->floorheight) ? dest : m_Sector->floorheight; if ((m_Sector->ceilingplane.a | m_Sector->ceilingplane.b | m_Sector->floorplane.a | m_Sector->floorplane.b) == 0 && - dest < -m_Sector->floorplane.d) + (!(i_compatflags2 & COMPATF2_FLOORMOVE) && dest < -m_Sector->floorplane.d)) { dest = -m_Sector->floorplane.d; } diff --git a/src/g_mapinfo.cpp b/src/g_mapinfo.cpp index 3b6e6eb92..710470bbd 100644 --- a/src/g_mapinfo.cpp +++ b/src/g_mapinfo.cpp @@ -1273,6 +1273,7 @@ MapFlagHandlers[] = { "compat_polyobj", MITYPE_COMPATFLAG, COMPATF_POLYOBJ, 0 }, { "compat_maskedmidtex", MITYPE_COMPATFLAG, COMPATF_MASKEDMIDTEX, 0 }, { "compat_badangles", MITYPE_COMPATFLAG, 0, COMPATF2_BADANGLES }, + { "compat_floormove", MITYPE_COMPATFLAG, 0, COMPATF2_FLOORMOVE }, { "cd_start_track", MITYPE_EATNEXT, 0, 0 }, { "cd_end1_track", MITYPE_EATNEXT, 0, 0 }, { "cd_end2_track", MITYPE_EATNEXT, 0, 0 }, diff --git a/wadsrc/static/compatibility.txt b/wadsrc/static/compatibility.txt index 64ecd112b..531e89a4d 100644 --- a/wadsrc/static/compatibility.txt +++ b/wadsrc/static/compatibility.txt @@ -171,3 +171,8 @@ E2B5D1400279335811C1C1C0B437D9C8 // Deathknights of the Dark Citadel, map54 { clearlinespecial 66 } + +8FA29398776146189396AA1AC6BB9E13 // Roger Ritenour's Phobos map03 +{ + floormove +} diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 2eab5628b..6a99b4459 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -1220,7 +1220,8 @@ OptionMenu "CompatibilityOptions" Option "Cripple sound for silent BFG trick", "compat_soundslots", "YesNo" Option "Draw polyobjects like Hexen", "compat_POLYOBJ", "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" Class "CompatibilityMenu" }