diff --git a/old-examples/shuffle/main.hank b/examples/shuffle/main.hank similarity index 100% rename from old-examples/shuffle/main.hank rename to examples/shuffle/main.hank diff --git a/old-examples/shuffle/test1.hlog b/examples/shuffle/test1.hlog similarity index 100% rename from old-examples/shuffle/test1.hlog rename to examples/shuffle/test1.hlog diff --git a/hank/Output.hx b/hank/Output.hx index a7c3c76..2025549 100644 --- a/hank/Output.hx +++ b/hank/Output.hx @@ -169,7 +169,11 @@ class Output { if (!altInstances.exists(a)) { altInstances[a] = new AltInstance(a.behavior, a.outputs, random); } - fullOutput += altInstances[a].next().format(story, hInterface, random, altInstances, scope, displayToggles); + var nextBranchOutput = altInstances[a].next(); + fullOutput += nextBranchOutput.format(story, hInterface, random, altInstances, scope, displayToggles); + if (nextBranchOutput.diverted) { + break; + } case HExpression(h): trace(h); var value = hInterface.evaluateExpr(h, scope);