From d67b15790456cc2e61a88a37c8de195062d19952 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 4 Feb 2023 12:59:51 +0100 Subject: [PATCH] embeddings:: fixed animation facing in more cylinders --- embeddings.cpp | 1 + graph.cpp | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/embeddings.cpp b/embeddings.cpp index c5999551..f0d58cb4 100644 --- a/embeddings.cpp +++ b/embeddings.cpp @@ -1022,6 +1022,7 @@ EX transmatrix xspinpush(ld dir, ld dist) { EX const transmatrix& lmirror() { if(cgi.emb->is_euc_in_product()) return Id; + if(cgi.emb->is_cylinder() && nil) return Id; if(cgi.emb->logical_to_intermediate[2][1]) return MirrorZ; if(cgi.emb->is_hyp_in_solnih()) return MirrorY; return Mirror; diff --git a/graph.cpp b/graph.cpp index a1c0741c..4b3be71c 100644 --- a/graph.cpp +++ b/graph.cpp @@ -2656,7 +2656,15 @@ EX bool applyAnimation(cell *c, shiftmatrix& V, double& footphase, int layer) { } footphase = a.footphase; V = V * a.wherenow * lrspintox(wnow); - if(cgi.emb->is_cylinder()) V = V * cspin90(1, 0); + if(cgi.emb->is_cylinder() && !gproduct) { + if(nil) { + V = V * lzpush(1); + V = V * spin270(); + V = V * lzpush(-1); + } + else + V = V * cspin90(1, 0); + } if(a.mirrored) V = V * lmirror(); if(a.attacking == 2) V = V * lpispin(); a.ltick = ticks;