mirror of https://github.com/ZDoom/gzdoom-gles.git
- Changed the ambient sound timer to use level.maptime instead of gametic so that it gets paused along with the rest of the game automatically.
SVN r2799 (trunk)
This commit is contained in:
parent
4da5ce74ca
commit
491da14d9b
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue