From: Ian Jackson Date: Mon, 19 Jul 2021 02:23:20 +0000 (+0100) Subject: lowering: Only do clashing Z heavy when needed X-Git-Tag: otter-0.7.2~24 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=2052a9c8a139ff032ccda8579c3677d53480a346;p=otter.git lowering: Only do clashing Z heavy when needed If there are no pieces Q to insert, we con't need to worry about this, because it'll just be an empty ignored plan entry. Signed-off-by: Ian Jackson --- diff --git a/templates/script.ts b/templates/script.ts index 6f070409..1a069962 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -738,6 +738,7 @@ function lower_pieces(targets_todo: LowerTodoList): } while (nomove_heavy.length && + (tomove_light.length || tomove_misstacked.length) && nomove_heavy[nomove_heavy.length-1].p.z == q_z_top) { // Yowzer. We have to reset the Z coordinates on these heavy // pieces, whose Z coordinate is the same as the stuff we are not