- removed all savegame compatibility handling, since the data is just too different from what it was before to try to convert it.

This commit is contained in:
Christoph Oelckers 2016-04-03 20:55:23 +02:00
commit 3ee42f6aa6
15 changed files with 150 additions and 604 deletions

View file

@ -341,22 +341,8 @@ void P_SerializeWorld (FArchive &arc)
{
arc << sec->floorplane
<< sec->ceilingplane;
if (SaveVersion < 3223)
{
BYTE bytelight;
arc << bytelight;
sec->lightlevel = bytelight;
}
else
{
arc << sec->lightlevel;
}
arc << sec->lightlevel;
arc << sec->special;
if (SaveVersion < 4523)
{
short tag;
arc << tag;
}
arc << sec->soundtraversed
<< sec->seqType
<< sec->friction
@ -372,49 +358,12 @@ void P_SerializeWorld (FArchive &arc)
<< sec->heightsec
<< sec->bottommap << sec->midmap << sec->topmap
<< sec->gravity;
if (SaveVersion >= 4530)
{
P_SerializeTerrain(arc, sec->terrainnum[0]);
P_SerializeTerrain(arc, sec->terrainnum[1]);
}
if (SaveVersion >= 4529)
{
arc << sec->damageamount;
}
else
{
short dmg;
arc << dmg;
sec->damageamount = dmg;
}
if (SaveVersion >= 4528)
{
arc << sec->damageinterval
<< sec->leakydamage
<< sec->damagetype;
}
else
{
short damagemod;
arc << damagemod;
sec->damagetype = MODtoDamageType(damagemod);
if (sec->damageamount < 20)
{
sec->leakydamage = 0;
sec->damageinterval = 32;
}
else if (sec->damageamount < 50)
{
sec->leakydamage = 5;
sec->damageinterval = 32;
}
else
{
sec->leakydamage = 256;
sec->damageinterval = 1;
}
}
P_SerializeTerrain(arc, sec->terrainnum[0]);
P_SerializeTerrain(arc, sec->terrainnum[1]);
arc << sec->damageamount;
arc << sec->damageinterval
<< sec->leakydamage
<< sec->damagetype;
arc << sec->SoundTarget
<< sec->SecActTarget
<< sec->sky
@ -422,13 +371,6 @@ void P_SerializeWorld (FArchive &arc)
<< sec->Flags
<< sec->SkyBoxes[sector_t::floor] << sec->SkyBoxes[sector_t::ceiling]
<< sec->ZoneNumber;
if (SaveVersion < 4529)
{
short secretsector;
arc << secretsector;
if (secretsector) sec->Flags |= SECF_WASSECRET;
P_InitSectorSpecial(sec, sec->special, true);
}
arc << sec->interpolations[0]
<< sec->interpolations[1]
<< sec->interpolations[2]
@ -461,11 +403,6 @@ void P_SerializeWorld (FArchive &arc)
<< li->special
<< li->Alpha;
if (SaveVersion < 4523)
{
int id;
arc << id;
}
if (P_IsACSSpecial(li->special))
{
P_SerializeACSScriptNumber(arc, li->args[0], false);
@ -476,12 +413,7 @@ 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;
arc << li->portalindex;
for (j = 0; j < 2; j++)
{
if (li->sidedef[j] == NULL)
@ -517,14 +449,7 @@ void P_SerializeWorld (FArchive &arc)
arc << zn->Environment;
}
if (SaveVersion >= 4532)
{
arc << linePortals;
}
else
{
linePortals.Clear();
}
arc << linePortals;
P_CollectLinkedPortals();
}