Fixed AS1/2 - tellTarget when single

This commit is contained in:
Jindra Petřík
2021-11-29 17:15:56 +01:00
parent ffd253b7cf
commit 7bd90af605
2 changed files with 10 additions and 1 deletions
@@ -192,13 +192,14 @@ public class ActionGraph extends Graph {
int targetStart;
int targetEnd;
GraphTargetItem targetStartItem = null;
boolean again;
do {
again = false;
targetStart = -1;
targetEnd = -1;
GraphTargetItem targetStartItem = null;
targetStartItem = null;
GraphTargetItem target = null;
for (int t = 0; t < list.size(); t++) {
GraphTargetItem it = list.get(t);
@@ -245,6 +246,13 @@ public class ActionGraph extends Graph {
}
}
}
if (targetStart > -1 && targetEnd == -1) {
targetEnd = list.size();
if (list.get(list.size() - 1) instanceof ScriptEndItem) {
targetEnd--;
}
}
if ((targetStart > -1) && (targetEnd > -1) && targetStartItem != null) {
List<GraphTargetItem> newlist = new ArrayList<>();
for (int i = 0; i < targetStart; i++) {