From 33622ed65298723e8e29f9b4cda091e8029f4dd9 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 23 Jul 2024 15:50:59 +0200 Subject: [PATCH] bobbing setting --- graph.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/graph.cpp b/graph.cpp index 9e0009e2..cbd908a4 100644 --- a/graph.cpp +++ b/graph.cpp @@ -766,10 +766,13 @@ EX color_t kind_outline(eItem it) { return OUTLINE_OTHER; } +/** should objects fly slightly up and down in product/twisted product geometries */ +EX bool bobbing = true; + EX shiftmatrix face_the_player(const shiftmatrix V) { if(GDIM == 2) return V; - if(mproduct) return orthogonal_move(V, cos(ptick(750)) * cgi.plevel / 16); - if(mhybrid) return V * zpush(cos(ptick(750)) * cgi.plevel / 16); + if(mproduct) return bobbing ? orthogonal_move(V, cos(ptick(750)) * cgi.plevel / 16) : V; + if(mhybrid) return bobbing ? V * zpush(cos(ptick(750)) * cgi.plevel / 16) : V; transmatrix dummy; /* used only in prod anyways */ if(embedded_plane && !cgi.emb->is_same_in_same()) return V; if(nonisotropic) return shiftless(spin_towards(unshift(V), dummy, C0, 2, 0));