- added a compatibility option to move vertices and applied it to E1M6 of Masters of Chaos.

This map has a door/lift combination that could trap the player without any chance to get out because both elements are so close together that it was almost impossible to trigger the lift. Moved two vertices by one map unit to make enough room.
This commit is contained in:
Christoph Oelckers 2017-03-01 22:06:39 +01:00
parent 9b2f31e692
commit 3c21ca9cb1
2 changed files with 30 additions and 1 deletions

View file

@ -86,6 +86,7 @@ enum
CP_SETTHINGZ, CP_SETTHINGZ,
CP_SETTAG, CP_SETTAG,
CP_SETTHINGFLAGS, CP_SETTHINGFLAGS,
CP_SETVERTEX,
}; };
// EXTERNAL FUNCTION PROTOTYPES -------------------------------------------- // EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
@ -345,7 +346,19 @@ void ParseCompatibility()
sc.MustGetNumber(); sc.MustGetNumber();
CompatParams.Push(sc.Number); CompatParams.Push(sc.Number);
} }
else else if (sc.Compare("setvertex"))
{
if (flags.ExtCommandIndex == ~0u) flags.ExtCommandIndex = CompatParams.Size();
CompatParams.Push(CP_SETVERTEX);
sc.MustGetNumber();
CompatParams.Push(sc.Number);
sc.MustGetFloat();
CompatParams.Push(int(sc.Float * 256)); // do not use full fixed here so that it can eventually handle larger levels
sc.MustGetFloat();
CompatParams.Push(int(sc.Float * 256)); // do not use full fixed here so that it can eventually handle larger levels
flags.CompatFlags[SLOT_BCOMPAT] |= BCOMPATF_REBUILDNODES;
}
else
{ {
sc.UnGet(); sc.UnGet();
break; break;
@ -600,6 +613,16 @@ void SetCompatibilityParams()
i += 3; i += 3;
break; break;
} }
case CP_SETVERTEX:
{
if ((unsigned)CompatParams[i + 1] < level.vertexes.Size())
{
level.vertexes[CompatParams[i + 1]].p.X = CompatParams[i + 2] / 256.;
level.vertexes[CompatParams[i + 1]].p.Y = CompatParams[i + 3] / 256.;
}
i += 4;
break;
}
} }
} }
} }

View file

@ -497,6 +497,12 @@ ABC4EB5A1535ECCD0061AD14F3547908 // Plutonia Experiment, map26
setsectorspecial 156 0 setsectorspecial 156 0
} }
B68EB7CFB4CC481796E2919B9C16DFBD // Moc11.wad e1m6
{
setvertex 1650 -3072 2671
setvertex 1642 -2944 2671
}
712BB4CFBD0753178CA0C6814BE4C288 // map12 BTSX_E1 - patch some rendering glitches that are problematic to detect 712BB4CFBD0753178CA0C6814BE4C288 // map12 BTSX_E1 - patch some rendering glitches that are problematic to detect
{ {
setsectortag 545 32000 setsectortag 545 32000