From b37ad3d8a8daaeaa1a9083eb95141658313e859a Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 1 Jun 2021 18:01:08 +0200 Subject: [PATCH] mobile:: rotating rug via orientation works again, and using rotate_view --- mobile.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mobile.cpp b/mobile.cpp index ba06918d..d97313d9 100644 --- a/mobile.cpp +++ b/mobile.cpp @@ -185,14 +185,14 @@ void apply_orientation() { main_last_orientation = T; else { transmatrix next_orientation = T; - View = main_last_orientation * View; + rotate_view(main_last_orientation); if(WDIM == 2 && vid.fixed_yz) { if(View[0][2] || View[1][2] || View[2][2]) { View = cspin(0, 2, -atan2(View[0][2], View[2][2])) * View; View = cspin(1, 2, -atan2(View[1][2], View[2][2])) * View; } } - View = inverse(next_orientation) * View; + rotate_view(inverse(next_orientation)); main_last_orientation = next_orientation; } } @@ -212,6 +212,11 @@ EX void mobile_draw(MOBPAR_FORMAL) { if(GDIM == 3 && !shmup::on && !rug::rugged) apply_orientation(); + if(rug::rugged) { + rug::using_rugview urv; + apply_orientation(); + } + if(playermoved && vid.sspeed > -4.99) centerpc(tdiff / 1000.0 * exp(vid.sspeed));