mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +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
|
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
|
||||||
|
|
|
@ -1917,11 +1917,34 @@ void AAmbientSound::Serialize (FArchive &arc)
|
||||||
Super::Serialize (arc);
|
Super::Serialize (arc);
|
||||||
arc << bActive;
|
arc << bActive;
|
||||||
|
|
||||||
|
if (SaveVersion < 1902)
|
||||||
|
{
|
||||||
|
arc << NextCheck;
|
||||||
|
NextCheck += gametic;
|
||||||
|
if (NextCheck < 0) NextCheck = INT_MAX;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (arc.IsStoring())
|
||||||
|
{
|
||||||
|
if (NextCheck != INT_MAX)
|
||||||
|
{
|
||||||
int checktime = NextCheck - gametic;
|
int checktime = NextCheck - gametic;
|
||||||
arc << checktime;
|
arc << checktime;
|
||||||
if (arc.IsLoading ())
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
NextCheck = checktime + gametic;
|
arc << NextCheck;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
arc << NextCheck;
|
||||||
|
if (checktime != INT_MAX)
|
||||||
|
{
|
||||||
|
NextCheck += gametic;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue