From ce11319968cda299ea69d7b1f32aad97f44439b2 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 23 Apr 2021 20:37:15 +0200 Subject: [PATCH] anim:: fixed rug rotation --- screenshot.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/screenshot.cpp b/screenshot.cpp index 172905bf..2867df4d 100644 --- a/screenshot.cpp +++ b/screenshot.cpp @@ -1312,10 +1312,12 @@ EX void apply() { #if CAP_RUG if(rug::rugged) { if(rug_rotation1) { - rug::rugView = cspin(1, 2, -rug_angle * degree) * cspin(0, 2, rug_rotation1 * 2 * M_PI * t / period) * cspin(1, 2, rug_angle * degree) * rug::rugView; + rug::using_rugview rv; + rotate_view(cspin(1, 2, -rug_angle * degree) * cspin(0, 2, rug_rotation1 * 2 * M_PI * t / period) * cspin(1, 2, rug_angle * degree)); } if(rug_rotation2) { - rug::rugView = rug::rugView * cspin(0, 1, rug_rotation2 * 2 * M_PI * t / period); + rug::using_rugview rv; + View = View * cspin(0, 1, rug_rotation2 * 2 * M_PI * t / period); } if(rug_forward) animate_rug_movement(rug_forward * t / period);