diff --git a/src/s_advsound.cpp b/src/s_advsound.cpp index 46d4bc813e..39ef8f75cd 100644 --- a/src/s_advsound.cpp +++ b/src/s_advsound.cpp @@ -2013,7 +2013,7 @@ void AAmbientSound::Serialize (FArchive &arc) NextCheck += gametic; if (NextCheck < 0) NextCheck = INT_MAX; } - else + else if (SaveVersion < 2798) { if (arc.IsStoring()) { @@ -2036,6 +2036,10 @@ void AAmbientSound::Serialize (FArchive &arc) } } } + else + { + arc << NextCheck; + } } //========================================================================== @@ -2048,7 +2052,7 @@ void AAmbientSound::Tick () { Super::Tick (); - if (!bActive || gametic < NextCheck) + if (!bActive || level.maptime < NextCheck) return; FAmbientSound *ambient; @@ -2176,7 +2180,7 @@ void AAmbientSound::Activate (AActor *activator) amb->periodmin = Scale(S_GetMSLength(sndnum), TICRATE, 1000); } - NextCheck = gametic; + NextCheck = level.maptime; if (amb->type & (RANDOM|PERIODIC)) SetTicker (amb);