- same for the ambient sound

# Conflicts:
#	src/s_advsound.cpp
This commit is contained in:
Christoph Oelckers 2019-01-07 17:28:30 +01:00
parent 36f0ab2ea1
commit 0fa92d59e2

View file

@ -2256,7 +2256,12 @@ DEFINE_ACTION_FUNCTION(AAmbientSound, Tick)
self->Tick();
if (!self->special2 || level.maptime < self->special1)
if (self->special1 > 0)
{
if (--self->special1 > 0) return 0;
}
if (!self->special2)
return 0;
FAmbientSound *ambient;
@ -2351,7 +2356,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);