From 1acf4fa477545eee17daf35bdf844679fb30394d Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 23 Apr 2022 00:40:08 +0200 Subject: [PATCH] get_valence now can use the information from arb --- barriers.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/barriers.cpp b/barriers.cpp index 2901cbeb..31c517b8 100644 --- a/barriers.cpp +++ b/barriers.cpp @@ -72,6 +72,14 @@ EX bool warped_version(eLand l1, eLand l2) { } EX int get_valence(cellwalker bb, int dir, bool& ok) { + if(arb::in()) { + auto& sh = arb::current_or_slided().shapes[arb::id_of(bb.at->master)]; + if(bb.mirrored) dir = -dir; + if(dir == 1) + return sh.vertex_valence[bb.spin]; + else + return sh.vertex_valence[gmod(bb.spin - 1, bb.at->type)]; + } int steps = 0; cellwalker bb1 = bb; while(bb1 != bb || !steps) {