mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 15:02:01 +00:00
- fixed the compatibility handler of AAmbientSound::Serialize.
SVN r2802 (trunk)
This commit is contained in:
parent
6789b8936c
commit
198c714dad
1 changed files with 3 additions and 33 deletions
|
@ -2005,40 +2005,10 @@ IMPLEMENT_CLASS (AAmbientSound)
|
|||
void AAmbientSound::Serialize (FArchive &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << bActive;
|
||||
|
||||
if (SaveVersion < 1902)
|
||||
arc << bActive << NextCheck;
|
||||
if (SaveVersion < 2798)
|
||||
{
|
||||
arc << NextCheck;
|
||||
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;
|
||||
NextCheck += level.maptime;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue