From cc19b4bd8a6ca292300f087ed23138115f89abe9 Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 19 Jan 2017 02:19:44 +0100 Subject: [PATCH] Fix door rotation order in collision case (Bug #3707) --- apps/openmw/mwworld/worldimp.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index c0dd40a97..2d1e2b139 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -1477,8 +1477,6 @@ namespace MWWorld float diff = duration * osg::DegreesToRadians(90.f); float targetRot = std::min(std::max(minRot, oldRot + diff * (it->second == 1 ? 1 : -1)), maxRot); rotateObject(it->first, objPos.rot[0], objPos.rot[1], targetRot); - // the rotation order we want to use - mWorldScene->updateObjectRotation(it->first, false); bool reached = (targetRot == maxRot && it->second) || targetRot == minRot; @@ -1502,6 +1500,9 @@ namespace MWWorld } } + // the rotation order we want to use + mWorldScene->updateObjectRotation(it->first, false); + if (reached) { // Mark as non-moving