- 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:
parent
9eaefc3685
commit
94b7ef72ca
13 changed files with 243 additions and 59 deletions
|
|
@ -53,6 +53,7 @@
|
|||
#include "p_lnspec.h"
|
||||
#include "p_acs.h"
|
||||
#include "p_terrain.h"
|
||||
#include "portal.h"
|
||||
|
||||
static void CopyPlayer (player_t *dst, player_t *src, const char *name);
|
||||
static void ReadOnePlayer (FArchive &arc, bool skipload);
|
||||
|
|
@ -474,6 +475,12 @@ void P_SerializeWorld (FArchive &arc)
|
|||
}
|
||||
arc << li->args[1] << li->args[2] << li->args[3] << li->args[4];
|
||||
|
||||
if (SaveVersion >= 4532)
|
||||
{
|
||||
arc << li->portalindex;
|
||||
}
|
||||
else li->portalindex = UINT_MAX;
|
||||
|
||||
for (j = 0; j < 2; j++)
|
||||
{
|
||||
if (li->sidedef[j] == NULL)
|
||||
|
|
@ -508,6 +515,15 @@ void P_SerializeWorld (FArchive &arc)
|
|||
{
|
||||
arc << zn->Environment;
|
||||
}
|
||||
|
||||
if (SaveVersion >= 4532)
|
||||
{
|
||||
arc << linePortals;
|
||||
}
|
||||
else
|
||||
{
|
||||
linePortals.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
void extsector_t::Serialize(FArchive &arc)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue