- 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:
parent
9b2f31e692
commit
3c21ca9cb1
2 changed files with 30 additions and 1 deletions
|
|
@ -86,6 +86,7 @@ enum
|
|||
CP_SETTHINGZ,
|
||||
CP_SETTAG,
|
||||
CP_SETTHINGFLAGS,
|
||||
CP_SETVERTEX,
|
||||
};
|
||||
|
||||
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
|
||||
|
|
@ -345,7 +346,19 @@ void ParseCompatibility()
|
|||
sc.MustGetNumber();
|
||||
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();
|
||||
break;
|
||||
|
|
@ -600,6 +613,16 @@ void SetCompatibilityParams()
|
|||
i += 3;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue