From 8aacbc398f629ecec0abe79317b6a6f5724fb8d4 Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 12 Nov 2015 00:52:36 +0100 Subject: [PATCH] Rotations: don't wrap the angle values for non-actors It's not really necessary, and just complicates logic elsewhere. Neither does vanilla MW do it. As well, the question is if wrapping to [-PI, PI] or [0, 2*PI] would be the desired range. --- apps/openmw/mwworld/worldimp.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 0f8c5aa32..ef594ddeb 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -1247,14 +1247,10 @@ namespace MWWorld if(objRot[0] < -half_pi) objRot[0] = -half_pi; else if(objRot[0] > half_pi) objRot[0] = half_pi; - } - else - { - wrap(objRot[0]); - } - wrap(objRot[1]); - wrap(objRot[2]); + wrap(objRot[1]); + wrap(objRot[2]); + } ptr.getRefData().setPosition(pos); @@ -1269,10 +1265,6 @@ namespace MWWorld rot.rot[1]=osg::DegreesToRadians(y); rot.rot[2]=osg::DegreesToRadians(z); - wrap(rot.rot[0]); - wrap(rot.rot[1]); - wrap(rot.rot[2]); - ptr.getRefData().setLocalRotation(rot); if (ptr.getRefData().getBaseNode() != 0)