- 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

@ -432,10 +432,6 @@ void APlayerPawn::Serialize (FArchive &arc)
<< MorphWeapon
<< DamageFade
<< PlayerFlags;
if (SaveVersion < 2435)
{
DamageFade.a = 255;
}
}
//===========================================================================
@ -2554,33 +2550,9 @@ void player_t::Serialize (FArchive &arc)
<< poisoncount
<< poisoner
<< attacker
<< extralight;
if (SaveVersion < 1858)
{
int fixedmap;
arc << fixedmap;
fixedcolormap = NOFIXEDCOLORMAP;
fixedlightlevel = -1;
if (fixedmap >= NUMCOLORMAPS)
{
fixedcolormap = fixedmap - NUMCOLORMAPS;
}
else if (fixedmap > 0)
{
fixedlightlevel = fixedmap;
}
}
else if (SaveVersion < 1893)
{
int ll;
arc << fixedcolormap << ll;
fixedlightlevel = ll;
}
else
{
arc << fixedcolormap << fixedlightlevel;
}
arc << morphTics
<< extralight
<< fixedcolormap << fixedlightlevel
<< morphTics
<< MorphedPlayerClass
<< MorphStyle
<< MorphExitFlash