From 68207b7a23c649a01c14e121c7f71a1505496f50 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 10 Mar 2025 18:16:10 +0100 Subject: [PATCH] check_orientation fixup --- rogueviz/seuphorica.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rogueviz/seuphorica.cpp b/rogueviz/seuphorica.cpp index 2560fcca..9bcf7ab4 100644 --- a/rogueviz/seuphorica.cpp +++ b/rogueviz/seuphorica.cpp @@ -80,13 +80,14 @@ void check_orientation(cell *c) { if(tile_orientation_level[c1] > maxlev) maxlev = tile_orientation_level[c1], dir = i; } + if(maxlev == 0) return; tile_orientation_level[c] = maxlev - 1; auto c1 = c->cmove(dir); cellwalker cw = tile_orientation[c1]; int steps = 0; while(cw.spin != c->c.spin(dir)) { cw--; steps++; } cw += wstep; cw += rev; - if(!anyshiftclick) while(steps) { cw++; steps--; } + while(steps) { cw++; steps--; } tile_orientation[c] = cw; }