- Added S_ChangeSoundVolume() to change the volume of an already playing sound, accessible

through the new ACS function SoundVolume.

SVN r4318 (trunk)
This commit is contained in:
Randy Heit 2013-06-01 17:46:50 +00:00
commit 1b9c71b252
7 changed files with 73 additions and 1 deletions

View file

@ -4134,6 +4134,7 @@ enum EACSFunctions
ACSF_StrMid,
ACSF_GetActorClass,
ACSF_GetWeapon,
ACSF_SoundVolume,
// ZDaemon
ACSF_GetTeamScore = 19620, // (int team)
@ -4964,6 +4965,29 @@ doplaysound: if (!looping)
}
break;
case ACSF_SoundVolume:
// SoundVolume(int tid, int channel, fixed volume)
{
int chan = args[1];
float volume = FIXED2FLOAT(args[2]);
if (args[0] == 0)
{
S_ChangeSoundVolume(activator, chan, volume);
}
else
{
FActorIterator it(args[0]);
AActor *spot;
while ((spot = it.Next()) != NULL)
{
S_ChangeSoundVolume(spot, chan, volume);
}
}
}
break;
case ACSF_strcmp:
case ACSF_stricmp:
if (argCount >= 2)