- more cleanup on portal implementation:

- store portal data in a separate structure.
- store portal data in savegames because some of this will be changeable later.
- run a cleanup pass after all portals have been created to weed out broken ones.
- add a definition type that's compatible with Eternity Engine's line portal types.
- swapped arg[2] and arg[3] of Line_SetPortal, because the type is more significant than the alignment.
This commit is contained in:
Christoph Oelckers 2016-02-05 23:15:56 +01:00
commit 94b7ef72ca
13 changed files with 243 additions and 59 deletions

View file

@ -2156,6 +2156,7 @@ void P_LoadLineDefs (MapData * map)
for (i = 0; i < numlines; i++, mld++, ld++)
{
ld->Alpha = FRACUNIT; // [RH] Opaque by default
ld->portalindex = UINT_MAX;
// [RH] Translate old linedef special and flags to be
// compatible with the new format.
@ -2236,6 +2237,8 @@ void P_LoadLineDefs2 (MapData * map)
{
int j;
ld->portalindex = UINT_MAX;
for (j = 0; j < 5; j++)
ld->args[j] = mld->args[j];
@ -3365,6 +3368,7 @@ void P_FreeLevelData ()
level.killed_monsters = level.found_items = level.found_secrets =
wminfo.maxfrags = 0;
linePortals.Clear();
FBehavior::StaticUnloadModules ();
if (vertexes != NULL)
{