Sync up most of the realistic mouselook code with alchemy.
This should fix the inverted mouselook when sitting problem Think the bug was in llvoavatar, but keeping in sync is always good for the future overall.
This commit is contained in:
@@ -1493,14 +1493,14 @@ void LLAgentCamera::updateCamera()
|
||||
if (realistic_ml)
|
||||
{
|
||||
LLQuaternion agent_rot(gAgent.getFrameAgent().getQuaternion());
|
||||
if (static_cast<LLViewerObject*>(gAgentAvatarp->getRoot())->flagCameraDecoupled())
|
||||
if (LLViewerObject* parent = static_cast<LLViewerObject*>(gAgentAvatarp->getParent()))
|
||||
if (LLViewerObject* parent = static_cast<LLViewerObject*>(gAgentAvatarp->getParent()))
|
||||
if (static_cast<LLViewerObject*>(gAgentAvatarp->getRoot())->flagCameraDecoupled())
|
||||
agent_rot *= parent->getRenderRotation();
|
||||
LLViewerCamera::getInstance()->updateCameraLocation(head_pos, mCameraUpVector, gAgentAvatarp->mHeadp->getWorldPosition() + LLVector3(1.0, 0.0, 0.0) * agent_rot);
|
||||
}
|
||||
else
|
||||
{
|
||||
const LLVector3 diff = (mCameraPositionAgent - head_pos) * ~gAgentAvatarp->mRoot->getWorldRotation();
|
||||
const LLVector3 diff((mCameraPositionAgent - head_pos) * ~gAgentAvatarp->mRoot->getWorldRotation());
|
||||
gAgentAvatarp->mPelvisp->setPosition(gAgentAvatarp->mPelvisp->getPosition() + diff);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user