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

https://forum.zdoom.org/viewtopic.php?t=68847

# Conflicts:
#	src/p_acs.cpp
This commit is contained in:
alexey.lysiuk 2020-06-07 12:16:46 +03:00 committed by drfrag
parent 55bbc4a86b
commit 8c877cb36a

View file

@ -10149,9 +10149,14 @@ scriptwait:
else
{
FActorIterator iterator (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);
}
@ -10175,9 +10180,14 @@ scriptwait:
else
{
FActorIterator iterator (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);
}