Added "local" parameters to A_PlaySound and ACS PlaySound

This commit is contained in:
nashmuhandes 2016-10-16 02:50:21 +08:00 committed by Christoph Oelckers
parent 6755373f46
commit b420347bab
5 changed files with 37 additions and 6 deletions

View file

@ -1032,16 +1032,17 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_PlaySound)
PARAM_FLOAT_OPT (volume) { volume = 1; }
PARAM_BOOL_OPT (looping) { looping = false; }
PARAM_FLOAT_OPT (attenuation) { attenuation = ATTN_NORM; }
PARAM_BOOL_OPT (local) { local = false; }
if (!looping)
{
S_Sound (self, channel, soundid, (float)volume, (float)attenuation);
S_PlaySound(self, channel, soundid, (float)volume, (float)attenuation, local);
}
else
{
if (!S_IsActorPlayingSomething (self, channel&7, soundid))
{
S_Sound (self, channel | CHAN_LOOP, soundid, (float)volume, (float)attenuation);
S_PlaySound(self, channel | CHAN_LOOP, soundid, (float)volume, (float)attenuation, local);
}
}
return 0;