- cleaned up switch code and fixed several problems:

* savegames stored an index in the switch table and performed no validation when loading a savegame.
  * setting of a random switch animation duration was broken.
  * separated the 2 values stored in the Time variable into 2 separate variables.
  * defining a switch with one texture already belonging to another switch could leave broken definitions in the switch table.
- added function for serializing switch and door animation pointers.
- bumped min. savegame versions due to changes to DButtonThinker and removed all current savegame compatibility code.


SVN r3030 (trunk)
This commit is contained in:
Christoph Oelckers 2010-12-12 15:43:35 +00:00
commit 0715b7dfc6
17 changed files with 194 additions and 344 deletions

View file

@ -347,16 +347,8 @@ void P_SerializeWorld (FArchive &arc)
<< sec->interpolations[0]
<< sec->interpolations[1]
<< sec->interpolations[2]
<< sec->interpolations[3];
if (SaveVersion < 2492)
{
sec->SeqName = NAME_None;
}
else
{
arc << sec->SeqName;
}
<< sec->interpolations[3]
<< sec->SeqName;
sec->e->Serialize(arc);
if (arc.IsStoring ())
@ -444,15 +436,7 @@ FArchive &operator<< (FArchive &arc, sector_t::splane &p)
{
arc << p.xform.xoffs << p.xform.yoffs << p.xform.xscale << p.xform.yscale
<< p.xform.angle << p.xform.base_yoffs << p.xform.base_angle
<< p.Flags << p.Light << p.Texture << p.TexZ;
if (SaveVersion >= 2992)
{
arc << p.alpha;
}
else
{
p.alpha = FRACUNIT;
}
<< p.Flags << p.Light << p.Texture << p.TexZ << p.alpha;
return arc;
}
@ -614,15 +598,6 @@ void P_SerializeSubsectors(FArchive &arc)
}
else
{
if (SaveVersion < 2609)
{
if (hasglnodes)
{
RecalculateDrawnSubsectors();
}
return;
}
arc << num_verts << num_subs << num_nodes;
if (num_verts != numvertexes ||
num_subs != numsubsectors ||