Browse Source

Handle special case of block calling itself

master
chrisgregan 10 years ago
parent
commit
d2acf9772f
  1. 8
      Assets/Fungus/Flowchart/Scripts/Commands/Call.cs

8
Assets/Fungus/Flowchart/Scripts/Commands/Call.cs

@ -36,6 +36,14 @@ namespace Fungus
if (targetBlock != null)
{
// Check if calling your own parent block
if (targetBlock == parentBlock)
{
// Just ignore the callmode in this case, and jump to first command in list
Continue(0);
return;
}
// Callback action for Wait Until Finished mode
Action onComplete = null;
if (callMode == CallMode.WaitUntilFinished)

Loading…
Cancel
Save