LLVOAvatar class members reorganized to line up with V2 better. Added accessors from v2 where applicable. mBakedTextureData renamed to mBakedTextureDatas

This commit is contained in:
Shyotl
2011-05-14 12:38:47 -05:00
parent 8df737b488
commit 4e47446be1
20 changed files with 1375 additions and 1258 deletions

View File

@@ -864,7 +864,7 @@ void LLAgent::setFlying(BOOL fly)
}
// don't allow taking off while sitting
if (fly && mAvatarObject->mIsSitting)
if (fly && mAvatarObject->isSitting())
{
return;
}
@@ -1363,7 +1363,7 @@ F32 LLAgent::clampPitchToLimits(F32 angle)
F32 angle_from_skyward = acos( mFrameAgent.getAtAxis() * skyward );
if (isAgentAvatarValid() && mAvatarObject->mIsSitting)
if (isAgentAvatarValid() && mAvatarObject->isSitting())
{
look_down_limit = 130.f * DEG_TO_RAD;
}
@@ -2716,7 +2716,7 @@ void LLAgent::updateLookAt(const S32 mouse_x, const S32 mouse_y)
else
{
// *FIX: rotate mframeagent by sit object's rotation?
LLQuaternion look_rotation = mAvatarObject->mIsSitting ? mAvatarObject->getRenderRotation() : mFrameAgent.getQuaternion(); // use camera's current rotation
LLQuaternion look_rotation = mAvatarObject->isSitting() ? mAvatarObject->getRenderRotation() : mFrameAgent.getQuaternion(); // use camera's current rotation
LLVector3 look_offset = LLVector3(2.f, 0.f, 0.f) * look_rotation * av_inv_rot;
setLookAt(LOOKAT_TARGET_IDLE, mAvatarObject, look_offset);
}
@@ -3158,7 +3158,7 @@ void LLAgent::updateCamera()
validateFocusObject();
if (isAgentAvatarValid() &&
mAvatarObject->mIsSitting &&
mAvatarObject->isSitting() &&
camera_mode == CAMERA_MODE_MOUSELOOK)
{
//Ventrella
@@ -3279,7 +3279,7 @@ void LLAgent::updateCamera()
// (2) focus, and (3) upvector. They can then be queried elsewhere in llAgent.
//--------------------------------------------------------------------------------
// *TODO: use combined rotation of frameagent and sit object
LLQuaternion avatarRotationForFollowCam = mAvatarObject->mIsSitting ? mAvatarObject->getRenderRotation() : mFrameAgent.getQuaternion();
LLQuaternion avatarRotationForFollowCam = mAvatarObject->isSitting() ? mAvatarObject->getRenderRotation() : mFrameAgent.getQuaternion();
LLFollowCamParams* current_cam = LLFollowCamMgr::getActiveFollowCamParams();
if (current_cam)
@@ -3460,7 +3460,7 @@ void LLAgent::updateCamera()
}
mLastPositionGlobal = global_pos;
if (LLVOAvatar::sVisibleInFirstPerson && mAvatarObject.notNull() && !mAvatarObject->mIsSitting && cameraMouselook())
if (LLVOAvatar::sVisibleInFirstPerson && mAvatarObject.notNull() && !mAvatarObject->isSitting() && cameraMouselook())
{
LLVector3 head_pos = mAvatarObject->mHeadp->getWorldPosition() +
LLVector3(0.08f, 0.f, 0.05f) * mAvatarObject->mHeadp->getWorldRotation() +
@@ -3650,7 +3650,7 @@ LLVector3d LLAgent::calcFocusPositionTargetGlobal()
}
return mFocusTargetGlobal;
}
else if (mSitCameraEnabled && mAvatarObject.notNull() && mAvatarObject->mIsSitting && mSitCameraReferenceObject.notNull())
else if (mSitCameraEnabled && mAvatarObject.notNull() && mAvatarObject->isSitting() && mSitCameraReferenceObject.notNull())
{
// sit camera
LLVector3 object_pos = mSitCameraReferenceObject->getRenderPosition();
@@ -3775,7 +3775,7 @@ LLVector3d LLAgent::calcCameraPositionTargetGlobal(BOOL *hit_limit)
return LLVector3d::zero;
}
head_offset.clearVec();
if (mAvatarObject->mIsSitting && mAvatarObject->getParent())
if (mAvatarObject->isSitting() && mAvatarObject->getParent())
{
mAvatarObject->updateHeadOffset();
head_offset.mdV[VX] = mAvatarObject->mHeadOffset.mV[VX];
@@ -3789,7 +3789,7 @@ LLVector3d LLAgent::calcCameraPositionTargetGlobal(BOOL *hit_limit)
else
{
head_offset.mdV[VZ] = mAvatarObject->mHeadOffset.mV[VZ];
if (mAvatarObject->mIsSitting)
if (mAvatarObject->isSitting())
{
head_offset.mdV[VZ] += 0.1;
}
@@ -3805,7 +3805,7 @@ LLVector3d LLAgent::calcCameraPositionTargetGlobal(BOOL *hit_limit)
if (mSitCameraEnabled
&& isAgentAvatarValid()
&& mAvatarObject->mIsSitting
&& mAvatarObject->isSitting()
&& mSitCameraReferenceObject.notNull())
{
// sit camera
@@ -3837,7 +3837,7 @@ LLVector3d LLAgent::calcCameraPositionTargetGlobal(BOOL *hit_limit)
local_camera_offset = mFrameAgent.rotateToAbsolute( local_camera_offset );
}
if (!mCameraCollidePlane.isExactlyZero() && (!isAgentAvatarValid() || !mAvatarObject->mIsSitting))
if (!mCameraCollidePlane.isExactlyZero() && (!isAgentAvatarValid() || !mAvatarObject->isSitting()))
{
LLVector3 plane_normal;
plane_normal.setVec(mCameraCollidePlane.mV);
@@ -4215,7 +4215,7 @@ void LLAgent::changeCameraToThirdPerson(BOOL animate)
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) +SG
if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT))
&& (mAvatarObject.notNull())
&& (mAvatarObject->mIsSitting)
&& (mAvatarObject->isSitting())
&& gSavedSettings.getBOOL("SianaUnsitOnCamReset"))
{
setControlFlags(AGENT_CONTROL_STAND_UP); // force stand up
@@ -4228,7 +4228,7 @@ void LLAgent::changeCameraToThirdPerson(BOOL animate)
if (isAgentAvatarValid())
{
if (!mAvatarObject->mIsSitting)
if (!mAvatarObject->isSitting())
{
mAvatarObject->mPelvisp->setPosition(LLVector3::zero);
}
@@ -6308,7 +6308,7 @@ void LLAgent::teleportViaLandmark(const LLUUID& landmark_asset_id)
// [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d)
if ( (rlv_handler_t::isEnabled()) &&
( (gRlvHandler.hasBehaviour(RLV_BHVR_TPLM)) ||
((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (mAvatarObject.notNull()) && (mAvatarObject->mIsSitting)) ))
((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (mAvatarObject.notNull()) && (mAvatarObject->isSitting())) ))
{
RlvNotifications::notifyBlockedTeleport();
return;
@@ -6384,7 +6384,7 @@ void LLAgent::teleportViaLocation(const LLVector3d& pos_global)
{
// If we're getting teleported due to @tpto we should disregard any @tploc=n or @unsit=n restrictions from the same object
if ( (gRlvHandler.hasBehaviourExcept(RLV_BHVR_TPLOC, gRlvHandler.getCurrentObject())) ||
( (mAvatarObject.notNull()) && (mAvatarObject->mIsSitting) &&
( (mAvatarObject.notNull()) && (mAvatarObject->isSitting()) &&
(gRlvHandler.hasBehaviourExcept(RLV_BHVR_UNSIT, gRlvHandler.getCurrentObject()))) )
{
RlvNotifications::notifyBlockedTeleport();