- fixed: AAmbientSound::Serialize was adjusting its timer value for savegames

even when it was set to a 'don't check' value.


SVN r1902 (trunk)
This commit is contained in:
Christoph Oelckers 2009-10-09 06:38:56 +00:00
parent 09866b2cff
commit 18c1b2685f
2 changed files with 31 additions and 4 deletions

View File

@ -1,3 +1,7 @@
October 9, 2009 (Changes by Graf Zahl)
- fixed: AAmbientSound::Serialize was adjusting its timer value for savegames
even when it was set to a 'don't check' value.
October 8, 2009 October 8, 2009
- Reinstated the off-by-one check in D3DFB from r399. I thought I could get by - Reinstated the off-by-one check in D3DFB from r399. I thought I could get by
at just fixing it at a specific value, since the supply of SM14 cards isn't at just fixing it at a specific value, since the supply of SM14 cards isn't

View File

@ -1917,11 +1917,34 @@ void AAmbientSound::Serialize (FArchive &arc)
Super::Serialize (arc); Super::Serialize (arc);
arc << bActive; arc << bActive;
int checktime = NextCheck - gametic; if (SaveVersion < 1902)
arc << checktime;
if (arc.IsLoading ())
{ {
NextCheck = checktime + gametic; arc << NextCheck;
NextCheck += gametic;
if (NextCheck < 0) NextCheck = INT_MAX;
}
else
{
if (arc.IsStoring())
{
if (NextCheck != INT_MAX)
{
int checktime = NextCheck - gametic;
arc << checktime;
}
else
{
arc << NextCheck;
}
}
else
{
arc << NextCheck;
if (checktime != INT_MAX)
{
NextCheck += gametic;
}
}
} }
} }