- added ‚repeat‘ option to SetLineActivation ACS function

This commit is contained in:
Christoph Oelckers 2022-04-29 00:58:07 +02:00
parent bd885977e8
commit 6bce14b86f
1 changed files with 3 additions and 0 deletions

View File

@ -6204,9 +6204,12 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
{
int line;
auto itr = Level->GetLineIdIterator(args[0]);
int repeat = argCount > 2? args[2] : -1;
while ((line = itr.Next()) >= 0)
{
Level->lines[line].activation = args[1];
if (repeat > 0) Level->lines[line].flags |= ML_REPEAT_SPECIAL;
else if (repeat == 0) Level->lines[line].flags &= ~ML_REPEAT_SPECIAL;
}
}
break;