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