From 8d06252b356e7f1ce8f090171c38ce41266853ac Mon Sep 17 00:00:00 2001 From: desktop-maesty/steve Date: Fri, 11 May 2018 21:11:36 +1000 Subject: [PATCH] StopFlowchart can continue now -as reported on the forum by inarval http://fungusgames.com/forum#!/general:stopflowchart-not-continuin --- .../Fungus/Scripts/Commands/StopFlowchart.cs | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Assets/Fungus/Scripts/Commands/StopFlowchart.cs b/Assets/Fungus/Scripts/Commands/StopFlowchart.cs index c11cedbb..d439796f 100644 --- a/Assets/Fungus/Scripts/Commands/StopFlowchart.cs +++ b/Assets/Fungus/Scripts/Commands/StopFlowchart.cs @@ -27,21 +27,21 @@ namespace Fungus { var flowchart = GetFlowchart(); - if (stopParentFlowchart) - { - flowchart.StopAllBlocks(); - } - for (int i = 0; i < targetFlowcharts.Count; i++) { var f = targetFlowcharts[i]; - if (f == flowchart) - { - // Flowchart has already been stopped - continue; - } f.StopAllBlocks(); } + + //current block and command logic doesn't require it in this order but it makes sense to + // stop everything but yourself first + if (stopParentFlowchart) + { + flowchart.StopAllBlocks(); + } + + //you might not be stopping this flowchart so keep going + Continue(); } public override bool IsReorderableArray(string propertyName)