- 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

View file

@ -6204,9 +6204,12 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
{ {
int line; int line;
auto itr = Level->GetLineIdIterator(args[0]); auto itr = Level->GetLineIdIterator(args[0]);
int repeat = argCount > 2? args[2] : -1;
while ((line = itr.Next()) >= 0) while ((line = itr.Next()) >= 0)
{ {
Level->lines[line].activation = args[1]; 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; break;