- made the gross railing hack for Strife a compatibility option and restricted it to MAP04

The side effects here broke other maps and this is really too glitchy to be turned on unless really necesasary.

# Conflicts:
#	src/gamedata/g_mapinfo.h
#	src/gamedata/stringtable.cpp
#	src/maploader/maploader.cpp
#	src/p_map.cpp
#	src/p_udmf.cpp
This commit is contained in:
Christoph Oelckers 2019-03-26 00:38:54 +01:00 committed by drfrag
parent 55e43293c5
commit 82fac693d8
10 changed files with 11 additions and 9 deletions

View file

@ -165,6 +165,7 @@ static FCompatOption Options[] =
{ "checkswitchrange", COMPATF2_CHECKSWITCHRANGE, SLOT_COMPAT2 },
{ "explode1", COMPATF2_EXPLODE1, SLOT_COMPAT2 },
{ "explode2", COMPATF2_EXPLODE2, SLOT_COMPAT2 },
{ "railing", COMPATF2_RAILING, SLOT_COMPAT2 },
{ NULL, 0, 0 }
};

View file

@ -357,7 +357,8 @@ enum : unsigned int
COMPATF2_PUSHWINDOW = 1 << 6, // Disable the window check in CheckForPushSpecial()
COMPATF2_CHECKSWITCHRANGE = 1 << 7, // Enable buggy CheckSwitchRange behavior
COMPATF2_EXPLODE1 = 1 << 8, // No vertical explosion thrust
COMPATF2_EXPLODE2 = 1 << 9 // Use original explosion code throughout.
COMPATF2_EXPLODE2 = 1 << 9, // Use original explosion code throughout.
COMPATF2_RAILING = 1 << 10, // Bugged Strife railings.
};
// Emulate old bugs for select maps. These are not exposed by a cvar

View file

@ -224,7 +224,7 @@ enum ELevelFlags : unsigned int
LEVEL2_FORCETEAMPLAYOFF = 0x00080000,
LEVEL2_CONV_SINGLE_UNFREEZE = 0x00100000,
LEVEL2_RAILINGHACK = 0x00200000, // but UDMF requires them to be separate to have more control
// = 0x00200000, // unused, was LEVEL2_RAILINGHACK
LEVEL2_DUMMYSWITCHES = 0x00400000,
LEVEL2_HEXENHACK = 0x00800000, // Level was defined in a Hexen style MAPINFO

View file

@ -1534,6 +1534,7 @@ MapFlagHandlers[] =
{ "compat_checkswitchrange", MITYPE_COMPATFLAG, 0, COMPATF2_CHECKSWITCHRANGE },
{ "compat_explode1", MITYPE_COMPATFLAG, 0, COMPATF2_EXPLODE1 },
{ "compat_explode2", MITYPE_COMPATFLAG, 0, COMPATF2_EXPLODE2 },
{ "compat_railing", MITYPE_COMPATFLAG, 0, COMPATF2_RAILING },
{ "cd_start_track", MITYPE_EATNEXT, 0, 0 },
{ "cd_end1_track", MITYPE_EATNEXT, 0, 0 },
{ "cd_end2_track", MITYPE_EATNEXT, 0, 0 },

View file

@ -988,7 +988,7 @@ bool PIT_CheckLine(FMultiBlockLinesIterator &mit, FMultiBlockLinesIterator::Chec
// better than Strife's handling of rails, which lets you jump into rails
// from either side. How long until somebody reports this as a bug and I'm
// forced to say, "It's not a bug. It's a feature?" Ugh.
(!(level.flags2 & LEVEL2_RAILINGHACK) ||
(!(i_compatflags2 & COMPATF2_RAILING) ||
open.bottom == tm.thing->Sector->floorplane.ZatPoint(ref)))
{
open.bottom += 32;

View file

@ -3367,10 +3367,6 @@ void P_SetupLevel(const char *lumpname, int position, bool newGame)
if (!map->HasBehavior && !map->isText)
{
// set compatibility flags
if (gameinfo.gametype == GAME_Strife)
{
level.flags2 |= LEVEL2_RAILINGHACK;
}
level.flags2 |= LEVEL2_DUMMYSWITCHES;
}

View file

@ -2146,7 +2146,7 @@ public:
case NAME_Strife:
namespace_bits = St;
P_LoadTranslator("xlat/strife_base.txt");
level.flags2 |= LEVEL2_DUMMYSWITCHES|LEVEL2_RAILINGHACK;
level.flags2 |= LEVEL2_DUMMYSWITCHES;
floordrop = true;
break;
default:

View file

@ -627,6 +627,7 @@ map MAP04 LOOKUP "TXT_STRIFE_MAP04"
sky1 = "SKYMNT02"
music = "D_FAST"
cluster = 1
compat_railing
}
map MAP05 LOOKUP "TXT_STRIFE_MAP05"

View file

@ -1607,6 +1607,7 @@ OptionMenu "CompatPhysicsMenu" protected
Option "$CMPTMNU_MISSILECLIP", "compat_MISSILECLIP", "YesNo"
Option "$CMPTMNU_EXPLODE1", "compat_explode1", "YesNo"
Option "$CMPTMNU_EXPLODE2", "compat_explode2", "YesNo"
Option "$CMPTMNU_RAILINGHACK", "compat_railing", "YesNo"
Class "CompatibilityMenu"
}

View file

@ -1342,5 +1342,6 @@ enum ECompatFlags
COMPATF2_PUSHWINDOW = 1 << 6, // Disable the window check in CheckForPushSpecial()
COMPATF2_CHECKSWITCHRANGE = 1 << 7, // Enable buggy CheckSwitchRange behavior
COMPATF2_EXPLODE1 = 1 << 8, // No vertical explosion thrust
COMPATF2_EXPLODE2 = 1 << 9 // Use original explosion code throughout.
COMPATF2_EXPLODE2 = 1 << 9, // Use original explosion code throughout.
COMPATF2_RAILING = 1 << 10, // Bugged Strife railings.
};