- fixed the compatibility handler of AAmbientSound::Serialize.

SVN r2802 (trunk)
This commit is contained in:
Christoph Oelckers 2010-09-16 20:47:41 +00:00
parent 6789b8936c
commit 198c714dad

View file

@ -2005,40 +2005,10 @@ IMPLEMENT_CLASS (AAmbientSound)
void AAmbientSound::Serialize (FArchive &arc) void AAmbientSound::Serialize (FArchive &arc)
{ {
Super::Serialize (arc); Super::Serialize (arc);
arc << bActive; arc << bActive << NextCheck;
if (SaveVersion < 2798)
if (SaveVersion < 1902)
{ {
arc << NextCheck; NextCheck += level.maptime;
NextCheck += gametic;
if (NextCheck < 0) NextCheck = INT_MAX;
}
else if (SaveVersion < 2798)
{
if (arc.IsStoring())
{
if (NextCheck != INT_MAX)
{
int checktime = NextCheck - gametic;
arc << checktime;
}
else
{
arc << NextCheck;
}
}
else
{
arc << NextCheck;
if (NextCheck != INT_MAX)
{
NextCheck += gametic;
}
}
}
else
{
arc << NextCheck;
} }
} }