From 5e0aac5e92ab73993378afe09608cac06240436a Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 19 Apr 2020 22:42:29 +0200 Subject: [PATCH] lshift+arrows now rotate the model in rug --- control.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/control.cpp b/control.cpp index ac6a38c2..4f21d54c 100644 --- a/control.cpp +++ b/control.cpp @@ -322,9 +322,22 @@ EX void full_forward_camera(ld t) { } EX void full_rotate_camera(int dir, ld val) { - if(history::on) + if(rug::rug_control() && lshiftclick) { + hyperpoint h; + if(nonisotropic) { + transmatrix T2 = eupush( tC0(inverse(View)) ); + transmatrix nlp = View * T2; + auto rV = inverse(nlp) * View; + h = nlp * inverse_exp(tC0(rV)); + } + else h = inverse_exp(tC0(View)); + shift_view(-h); + rotate_view(cspin(dir, 2, val)); + shift_view(h); + } + else if(history::on) history::lvspeed += (dir?1:-1) * val / 2; - else if(GDIM == 3 && anyshiftclick) + else if(GDIM == 3 && rshiftclick) shift_view(ctangent(dir, -val)), didsomething = true, playermoved = false; /* -val because shift reverses */ #if CAP_CRYSTAL else if(rug::rug_control() && rug::in_crystal())