mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-20 18:42:17 +00:00
- same for the ambient sound
# Conflicts: # src/s_advsound.cpp
This commit is contained in:
parent
381eb7a407
commit
d6b18e5792
1 changed files with 7 additions and 2 deletions
|
@ -2263,8 +2263,13 @@ DEFINE_ACTION_FUNCTION(AAmbientSound, Tick)
|
|||
PARAM_SELF_PROLOGUE(AActor);
|
||||
|
||||
self->Tick();
|
||||
|
||||
if (self->special1 > 0)
|
||||
{
|
||||
if (--self->special1 > 0) return 0;
|
||||
}
|
||||
|
||||
if (!self->special2 || level.maptime < self->special1)
|
||||
if (!self->special2)
|
||||
return 0;
|
||||
|
||||
FAmbientSound *ambient;
|
||||
|
@ -2359,7 +2364,7 @@ DEFINE_ACTION_FUNCTION(AAmbientSound, Activate)
|
|||
amb->periodmin = ::Scale(S_GetMSLength(sndnum), TICRATE, 1000);
|
||||
}
|
||||
|
||||
self->special1 = level.maptime;
|
||||
self->special1 = 0;
|
||||
if (amb->type & (RANDOM|PERIODIC))
|
||||
self->special1 += GetTicker (amb);
|
||||
|
||||
|
|
Loading…
Reference in a new issue