Tiny cleanup
This commit is contained in:
@@ -410,11 +410,7 @@ LLVector3 LLAgentCamera::calcFocusOffset(LLViewerObject *object, LLVector3 origi
|
||||
}
|
||||
|
||||
LLQuaternion inv_obj_rot = ~obj_rot; // get inverse of rotation
|
||||
LLVector3 object_extents = object->getScale();
|
||||
//this stuff just seems to make camera snapping worse...
|
||||
//const LLVector4a* oe4 = object->mDrawable->getSpatialExtents();
|
||||
//object_extents.set( oe4[1][0], oe4[1][1], oe4[1][2] );
|
||||
|
||||
LLVector3 object_extents = object->getScale();
|
||||
|
||||
// make sure they object extents are non-zero
|
||||
object_extents.clamp(0.001f, F32_MAX);
|
||||
@@ -2314,10 +2310,6 @@ void LLAgentCamera::changeCameraToThirdPerson(BOOL animate)
|
||||
mCameraMode = CAMERA_MODE_THIRD_PERSON;
|
||||
U32 old_flags = gAgent.getControlFlags();
|
||||
gAgent.clearControlFlags(AGENT_CONTROL_MOUSELOOK);
|
||||
if (old_flags != gAgent.getControlFlags())
|
||||
{
|
||||
gAgent.setFlagsDirty();
|
||||
}
|
||||
}
|
||||
|
||||
// Remove any pitch from the avatar
|
||||
|
||||
@@ -2116,32 +2116,28 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
|
||||
static const LLCachedControl<bool> use_new_target_omega ("UseNewTargetOmegaCode", true);
|
||||
if (use_new_target_omega)
|
||||
{ // New, experimental code
|
||||
if (new_rot != getRotation() || new_angv != old_angv)
|
||||
if ((new_rot != getRotation()) || (new_angv != old_angv))
|
||||
{
|
||||
if (new_angv != old_angv)
|
||||
if (new_rot != mPreviousRotation)
|
||||
{
|
||||
if (new_rot != mPreviousRotation)
|
||||
resetRot();
|
||||
}
|
||||
else if (new_angv != old_angv)
|
||||
{
|
||||
if (flagUsePhysics())
|
||||
{
|
||||
resetRot();
|
||||
}
|
||||
else if (new_angv != old_angv)
|
||||
else
|
||||
{
|
||||
if (flagUsePhysics())
|
||||
{
|
||||
resetRot();
|
||||
}
|
||||
else
|
||||
{
|
||||
mRotTime = 0.0f;
|
||||
}
|
||||
mRotTime = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
// Remember the last rotation value
|
||||
mPreviousRotation = new_rot;
|
||||
|
||||
// Set the rotation of the object followed by adjusting for the
|
||||
// accumulated angular velocity (llSetTargetOmega)
|
||||
// Set the rotation of the object followed by adjusting for the accumulated angular velocity (llSetTargetOmega)
|
||||
setRotation(new_rot * mAngularVelocityRot);
|
||||
setChanged(ROTATED | SILHOUETTE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user