mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 06:53:40 +00:00
- 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:
parent
09866b2cff
commit
18c1b2685f
2 changed files with 31 additions and 4 deletions
|
@ -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
|
||||
- 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
|
||||
|
|
|
@ -1917,11 +1917,34 @@ void AAmbientSound::Serialize (FArchive &arc)
|
|||
Super::Serialize (arc);
|
||||
arc << bActive;
|
||||
|
||||
int checktime = NextCheck - gametic;
|
||||
arc << checktime;
|
||||
if (arc.IsLoading ())
|
||||
if (SaveVersion < 1902)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue