- fixed (un)morphing of more than one actor from ACS

https://forum.zdoom.org/viewtopic.php?t=68847
This commit is contained in:
alexey.lysiuk 2020-06-07 12:16:46 +03:00
parent 11ba0be4c2
commit 8a1091c6fe

View file

@ -10027,9 +10027,14 @@ scriptwait:
else
{
auto iterator = Level->GetActorIterator(tag);
AActor *actor;
TArray<AActor*> actorsToMorph;
while ( (actor = iterator.Next ()) )
while (AActor *actor = iterator.Next())
{
actorsToMorph.Push(actor);
}
for (AActor *actor : actorsToMorph)
{
changes += P_MorphActor(activator, actor, playerclass, monsterclass, duration, style, morphflash, unmorphflash);
}
@ -10053,9 +10058,14 @@ scriptwait:
else
{
auto iterator = Level->GetActorIterator(tag);
AActor *actor;
TArray<AActor*> actorsToUnmorph;
while ( (actor = iterator.Next ()) )
while (AActor *actor = iterator.Next())
{
actorsToUnmorph.Push(actor);
}
for (AActor *actor : actorsToUnmorph)
{
changes += P_UnmorphActor(activator, actor, 0, force);
}