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.
openmw-37
scrawl 9 years ago
parent a07c6b4364
commit 8aacbc398f

@ -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]);
}
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)

Loading…
Cancel
Save