mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
- 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.
This commit is contained in:
parent
0422f40d80
commit
0341a3d75b
11 changed files with 12 additions and 11 deletions
|
@ -330,7 +330,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
|
||||
|
|
|
@ -1644,6 +1644,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 },
|
||||
|
|
|
@ -225,7 +225,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
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ TArray<TArray<FString>> FStringTable::parseCSV(const TArray<uint8_t> &buffer)
|
|||
while (vend > vcopy && myisspace((unsigned char)vend[-1])) *--vend = 0; // skip over trailing whitespace
|
||||
*/
|
||||
|
||||
for (int i = 0; i < bufLength; ++i)
|
||||
for (size_t i = 0; i < bufLength; ++i)
|
||||
{
|
||||
if (buffer[i] == '"')
|
||||
{
|
||||
|
|
|
@ -167,6 +167,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 }
|
||||
};
|
||||
|
||||
|
|
|
@ -3004,11 +3004,6 @@ void MapLoader::LoadLevel(MapData *map, const char *lumpname, int position)
|
|||
|
||||
if (!map->HasBehavior && !map->isText)
|
||||
{
|
||||
// set compatibility flags
|
||||
if (gameinfo.gametype == GAME_Strife)
|
||||
{
|
||||
Level->flags2 |= LEVEL2_RAILINGHACK;
|
||||
}
|
||||
Level->flags2 |= LEVEL2_DUMMYSWITCHES;
|
||||
}
|
||||
|
||||
|
|
|
@ -2161,7 +2161,7 @@ public:
|
|||
case NAME_Strife:
|
||||
namespace_bits = St;
|
||||
Level->Translator = P_LoadTranslator("xlat/strife_base.txt");
|
||||
Level->flags2 |= LEVEL2_DUMMYSWITCHES|LEVEL2_RAILINGHACK;
|
||||
Level->flags2 |= LEVEL2_DUMMYSWITCHES;
|
||||
floordrop = true;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -976,7 +976,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.
|
||||
(!(tm.thing->Level->flags2 & LEVEL2_RAILINGHACK) ||
|
||||
(!(tm.thing->Level->i_compatflags2 & COMPATF2_RAILING) ||
|
||||
open.bottom == tm.thing->Sector->floorplane.ZatPoint(ref)))
|
||||
{
|
||||
open.bottom += 32;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -1661,6 +1661,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"
|
||||
}
|
||||
|
||||
|
|
|
@ -1341,5 +1341,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.
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue