mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-10 06:44:29 +00:00
Fix door rotation order in collision case (Bug #3707)
This commit is contained in:
parent
45fb4f04b1
commit
cc19b4bd8a
@ -1477,8 +1477,6 @@ namespace MWWorld
|
|||||||
float diff = duration * osg::DegreesToRadians(90.f);
|
float diff = duration * osg::DegreesToRadians(90.f);
|
||||||
float targetRot = std::min(std::max(minRot, oldRot + diff * (it->second == 1 ? 1 : -1)), maxRot);
|
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);
|
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;
|
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)
|
if (reached)
|
||||||
{
|
{
|
||||||
// Mark as non-moving
|
// Mark as non-moving
|
||||||
|
Loading…
x
Reference in New Issue
Block a user