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:
@@ -419,7 +419,7 @@ void LLFloaterAO::onComboBoxCommit(LLUICtrl* ctrl, void* userdata)
|
||||
{
|
||||
int state = STATE_AGENT_IDLE;
|
||||
std::string stranim = box->getValue().asString();
|
||||
// llinfos << "state " << (gAgent.getAvatarObject()->mIsSitting) << " - " << getAnimationState() << llendl;
|
||||
// llinfos << "state " << (gAgent.getAvatarObject()->isSitting()) << " - " << getAnimationState() << llendl;
|
||||
if (box->getName() == "walks")
|
||||
{
|
||||
gAgent.sendAnimationRequest(GetAnimID(ANIM_AGENT_WALK), ANIM_REQUEST_STOP);
|
||||
@@ -442,7 +442,7 @@ void LLFloaterAO::onComboBoxCommit(LLUICtrl* ctrl, void* userdata)
|
||||
{
|
||||
if (gAgent.getAvatarObject() && (gSavedSettings.getBOOL("AOEnabled")) && (gSavedSettings.getBOOL("AOSitsEnabled")))
|
||||
{
|
||||
if ((gAgent.getAvatarObject()->mIsSitting) && (getAnimationState() == STATE_AGENT_SIT))
|
||||
if ((gAgent.getAvatarObject()->isSitting()) && (getAnimationState() == STATE_AGENT_SIT))
|
||||
{
|
||||
// llinfos << "sitting " << GetAnimID(ANIM_AGENT_SIT) << " " << getAssetIDByName(stranim) << llendl;
|
||||
gAgent.sendAnimationRequest(GetAnimID(ANIM_AGENT_SIT), ANIM_REQUEST_STOP);
|
||||
@@ -457,7 +457,7 @@ void LLFloaterAO::onComboBoxCommit(LLUICtrl* ctrl, void* userdata)
|
||||
// llinfos << "gsitting " << GetAnimID(ANIM_AGENT_SIT_GROUND) << " " << getAssetIDByName(stranim) << llendl;
|
||||
if (gAgent.getAvatarObject())
|
||||
{
|
||||
if ((gAgent.getAvatarObject()->mIsSitting) && (getAnimationState() == STATE_AGENT_GROUNDSIT))
|
||||
if ((gAgent.getAvatarObject()->isSitting()) && (getAnimationState() == STATE_AGENT_GROUNDSIT))
|
||||
{
|
||||
// llinfos << "gsitting " << GetAnimID(ANIM_AGENT_SIT_GROUND) << " " << getAssetIDByName(stranim) << llendl;
|
||||
gAgent.sendAnimationRequest(GetAnimID(ANIM_AGENT_SIT_GROUND), ANIM_REQUEST_STOP);
|
||||
@@ -768,7 +768,7 @@ int LLFloaterAO::getAnimationState()
|
||||
{
|
||||
if (gAgent.getAvatarObject())
|
||||
{
|
||||
if (gAgent.getAvatarObject()->mIsSitting) setAnimationState(STATE_AGENT_SIT);
|
||||
if (gAgent.getAvatarObject()->isSitting()) setAnimationState(STATE_AGENT_SIT);
|
||||
else if (gAgent.getFlying()) setAnimationState(STATE_AGENT_HOVER);
|
||||
}
|
||||
return mAnimationState;
|
||||
@@ -859,7 +859,7 @@ BOOL LLFloaterAO::ChangeStand()
|
||||
{
|
||||
if (gSavedSettings.getBOOL("AONoStandsInMouselook") && gAgent.cameraMouselook()) return FALSE;
|
||||
|
||||
if (gAgent.getAvatarObject()->mIsSitting)
|
||||
if (gAgent.getAvatarObject()->isSitting())
|
||||
{
|
||||
// stopMotion(getCurrentStandId(), FALSE, TRUE); //stop stand first then set state
|
||||
// if (getAnimationState() != STATE_AGENT_GROUNDSIT) setAnimationState(STATE_AGENT_SIT);
|
||||
@@ -912,7 +912,7 @@ BOOL LLFloaterAO::startMotion(const LLUUID& id, F32 time_offset, BOOL stand)
|
||||
BOOL sitting = FALSE;
|
||||
if (gAgent.getAvatarObject())
|
||||
{
|
||||
sitting = gAgent.getAvatarObject()->mIsSitting;
|
||||
sitting = gAgent.getAvatarObject()->isSitting();
|
||||
}
|
||||
if (sitting) return FALSE;
|
||||
gAgent.sendAnimationRequest(id, ANIM_REQUEST_START);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -325,9 +325,9 @@ void LLOverlayBar::refresh()
|
||||
BOOL sitting = FALSE;
|
||||
if (gAgent.getAvatarObject())
|
||||
{
|
||||
// sitting = gAgent.getAvatarObject()->mIsSitting;
|
||||
// sitting = gAgent.getAvatarObject()->isSitting();
|
||||
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
|
||||
sitting = gAgent.getAvatarObject()->mIsSitting && !gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT);
|
||||
sitting = gAgent.getAvatarObject()->isSitting() && !gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT);
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
button = getChild<LLButton>("Stand Up");
|
||||
@@ -449,7 +449,7 @@ void LLOverlayBar::onClickMouselook(void*)
|
||||
void LLOverlayBar::onClickStandUp(void*)
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
|
||||
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (gAgent.getAvatarObject()) && (gAgent.getAvatarObject()->mIsSitting) )
|
||||
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (gAgent.getAvatarObject()) && (gAgent.getAvatarObject()->isSitting()) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ void LLPanelContents::getState(LLViewerObject *objectp )
|
||||
LLViewerObject* pObj = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(TRUE);
|
||||
|
||||
LLVOAvatar* pAvatar = gAgent.getAvatarObject();
|
||||
editable = (pObj) && (pAvatar) && ((!pAvatar->mIsSitting) || (pAvatar->getRoot() != pObj->getRootEdit()));
|
||||
editable = (pObj) && (pAvatar) && ((!pAvatar->isSitting()) || (pAvatar->getRoot() != pObj->getRootEdit()));
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
@@ -185,7 +185,7 @@ void LLPanelContents::onClickNewScript(void *userdata)
|
||||
else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) )
|
||||
{
|
||||
LLVOAvatar* pAvatar = gAgent.getAvatarObject();
|
||||
if ( (pAvatar) && (pAvatar->mIsSitting) && (pAvatar->getRoot() == object->getRootEdit()) )
|
||||
if ( (pAvatar) && (pAvatar->isSitting()) && (pAvatar->getRoot() == object->getRootEdit()) )
|
||||
return; // .. or in a linkset the avie is sitting on under @unsit=n/@sittp=n
|
||||
}
|
||||
}
|
||||
|
||||
@@ -447,7 +447,7 @@ BOOL LLTaskInvFVBridge::isItemMovable()
|
||||
else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) )
|
||||
{
|
||||
LLVOAvatar* pAvatar = gAgent.getAvatarObject();
|
||||
if ( (pAvatar) && (pAvatar->mIsSitting) && (pAvatar->getRoot() == pObj->getRootEdit()) )
|
||||
if ( (pAvatar) && (pAvatar->isSitting()) && (pAvatar->getRoot() == pObj->getRootEdit()) )
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@@ -470,7 +470,7 @@ BOOL LLTaskInvFVBridge::isItemRemovable()
|
||||
else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) )
|
||||
{
|
||||
LLVOAvatar* pAvatar = gAgent.getAvatarObject();
|
||||
if ( (pAvatar) && (pAvatar->mIsSitting) && (pAvatar->getRoot() == pObjRoot) )
|
||||
if ( (pAvatar) && (pAvatar->isSitting()) && (pAvatar->getRoot() == pObjRoot) )
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -505,7 +505,7 @@ void LLPanelObject::getState( )
|
||||
if ( (rlv_handler_t::isEnabled()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP))) )
|
||||
{
|
||||
LLVOAvatar* pAvatar = gAgent.getAvatarObject();
|
||||
if ( (pAvatar) && (pAvatar->mIsSitting) && (pAvatar->getRoot() == objectp->getRootEdit()) )
|
||||
if ( (pAvatar) && (pAvatar->isSitting()) && (pAvatar->getRoot() == objectp->getRootEdit()) )
|
||||
enable_move = enable_scale = enable_rotate = FALSE;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
@@ -218,7 +218,7 @@ BOOL LLTexLayerSetBuffer::needsRender()
|
||||
{
|
||||
LLVOAvatar* avatar = mTexLayerSet->getAvatar();
|
||||
BOOL upload_now = needsUploadNow();
|
||||
BOOL needs_update = (mNeedsUpdate || upload_now) && !avatar->mAppearanceAnimating;
|
||||
BOOL needs_update = (mNeedsUpdate || upload_now) && !avatar->getIsAppearanceAnimating();
|
||||
if (needs_update)
|
||||
{
|
||||
BOOL invalid_skirt = avatar->getBakedTE(mTexLayerSet) == TEX_SKIRT_BAKED && !avatar->isWearingWearableType(WT_SKIRT);
|
||||
@@ -1736,7 +1736,7 @@ BOOL LLTexLayer::renderAlphaMasks( S32 x, S32 y, S32 width, S32 height, LLColor4
|
||||
for( morph_list_t::iterator iter3 = mMaskedMorphs.begin();
|
||||
iter3 != mMaskedMorphs.end(); iter3++ )
|
||||
{
|
||||
LLMaskedMorph* maskedMorph = &(*iter3);
|
||||
LLVOAvatar::LLMaskedMorph* maskedMorph = &(*iter3);
|
||||
maskedMorph->mMorphTarget->applyMask(alpha_data, width, height, 1, maskedMorph->mInvert);
|
||||
}
|
||||
}
|
||||
@@ -1749,7 +1749,7 @@ void LLTexLayer::applyMorphMask(U8* tex_data, S32 width, S32 height, S32 num_com
|
||||
for( morph_list_t::iterator iter = mMaskedMorphs.begin();
|
||||
iter != mMaskedMorphs.end(); iter++ )
|
||||
{
|
||||
LLMaskedMorph* maskedMorph = &(*iter);
|
||||
LLVOAvatar::LLMaskedMorph* maskedMorph = &(*iter);
|
||||
maskedMorph->mMorphTarget->applyMask(tex_data, width, height, num_components, maskedMorph->mInvert);
|
||||
}
|
||||
}
|
||||
@@ -1832,7 +1832,7 @@ void LLTexLayer::requestUpdate()
|
||||
|
||||
void LLTexLayer::addMaskedMorph(LLPolyMorphTarget* morph_target, BOOL invert)
|
||||
{
|
||||
mMaskedMorphs.push_front(LLMaskedMorph(morph_target, invert));
|
||||
mMaskedMorphs.push_front(LLVOAvatar::LLMaskedMorph(morph_target, invert));
|
||||
}
|
||||
|
||||
void LLTexLayer::invalidateMorphMasks()
|
||||
@@ -2619,11 +2619,3 @@ BOOL LLTexStaticImageList::loadImageRaw( const std::string& file_name, LLImageRa
|
||||
return success;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLMaskedMorph()
|
||||
//-----------------------------------------------------------------------------
|
||||
LLMaskedMorph::LLMaskedMorph( LLPolyMorphTarget *morph_target, BOOL invert ) : mMorphTarget(morph_target), mInvert(invert)
|
||||
{
|
||||
morph_target->addPendingMorphMask();
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "llwearable.h"
|
||||
#include "v4color.h"
|
||||
#include "llfloater.h"
|
||||
#include "llvoavatar.h"
|
||||
|
||||
class LLTexLayerSetInfo;
|
||||
class LLTexLayerSet;
|
||||
@@ -309,20 +310,6 @@ protected:
|
||||
LLTexLayerSetInfo *mInfo;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLMaskedMorph
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class LLMaskedMorph
|
||||
{
|
||||
public:
|
||||
LLMaskedMorph( LLPolyMorphTarget *morph_target, BOOL invert );
|
||||
|
||||
public:
|
||||
LLPolyMorphTarget *mMorphTarget;
|
||||
BOOL mInvert;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLTexLayer
|
||||
// A single texture layer
|
||||
@@ -374,7 +361,7 @@ protected:
|
||||
alpha_list_t mParamAlphaList;
|
||||
|
||||
|
||||
typedef std::deque<LLMaskedMorph> morph_list_t;
|
||||
typedef std::deque<LLVOAvatar::LLMaskedMorph> morph_list_t;
|
||||
morph_list_t mMaskedMorphs;
|
||||
typedef std::map<U32, U8*> alpha_cache_t;
|
||||
alpha_cache_t mAlphaCache;
|
||||
|
||||
@@ -295,7 +295,7 @@ void LLToolBar::refresh()
|
||||
BOOL sitting = FALSE;
|
||||
if (gAgent.getAvatarObject())
|
||||
{
|
||||
sitting = gAgent.getAvatarObject()->mIsSitting;
|
||||
sitting = gAgent.getAvatarObject()->isSitting();
|
||||
}
|
||||
|
||||
childSetEnabled("fly_btn", (gAgent.canFly() || gAgent.getFlying() || gSavedSettings.getBOOL("AscentFlyAlwaysEnabled")) && !sitting );
|
||||
|
||||
@@ -2068,7 +2068,7 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL
|
||||
else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) )
|
||||
{
|
||||
LLVOAvatar* pAvatar = gAgent.getAvatarObject();
|
||||
if ( (pAvatar) && (pAvatar->mIsSitting) && (pAvatar->getRoot() == pObjRoot) )
|
||||
if ( (pAvatar) && (pAvatar->isSitting()) && (pAvatar->getRoot() == pObjRoot) )
|
||||
return ACCEPT_NO_LOCKED; // ... or on a linkset the avie is sitting on under @unsit=n/@sittp=n
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ void LLVisualParamHint::requestHintUpdates( LLVisualParamHint* exception1, LLVis
|
||||
|
||||
BOOL LLVisualParamHint::needsRender()
|
||||
{
|
||||
return mNeedsUpdate && mDelayFrames-- <= 0 && !gAgent.getAvatarObject()->mAppearanceAnimating && mAllowsUpdates;
|
||||
return mNeedsUpdate && mDelayFrames-- <= 0 && !gAgent.getAvatarObject()->getIsAppearanceAnimating() && mAllowsUpdates;
|
||||
}
|
||||
|
||||
void LLVisualParamHint::preRender(BOOL clear_depth)
|
||||
|
||||
@@ -204,7 +204,7 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show)
|
||||
// touch behavior down below...
|
||||
break;
|
||||
case CLICK_ACTION_SIT:
|
||||
if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->mIsSitting)
|
||||
if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->isSitting())
|
||||
&& (!gSavedSettings.getBOOL("DisableClickSit"))) // agent not already sitting
|
||||
{
|
||||
handle_sit_or_stand();
|
||||
@@ -552,9 +552,9 @@ ECursorType cursor_from_object(LLViewerObject* object)
|
||||
switch(click_action)
|
||||
{
|
||||
case CLICK_ACTION_SIT:
|
||||
// if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->mIsSitting)) // not already sitting?
|
||||
// if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->isSitting())) // not already sitting?
|
||||
// [RLVa:KB] - Checked: 2009-12-22 (RLVa-1.1.0k) | Added: RLVa-1.1.0j
|
||||
if ( ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->mIsSitting)) && // not already sitting?
|
||||
if ( ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->isSitting())) && // not already sitting?
|
||||
((!rlv_handler_t::isEnabled()) || (gRlvHandler.canSit(object, gViewerWindow->getHoverPick().mObjectOffset))) )
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
|
||||
@@ -842,7 +842,7 @@ EKeyboardMode LLViewerKeyboard::getMode()
|
||||
{
|
||||
return MODE_EDIT_AVATAR;
|
||||
}
|
||||
else if (gAgent.getAvatarObject() && gAgent.getAvatarObject()->mIsSitting)
|
||||
else if (gAgent.getAvatarObject() && gAgent.getAvatarObject()->isSitting())
|
||||
{
|
||||
return MODE_SITTING;
|
||||
}
|
||||
|
||||
@@ -3498,7 +3498,7 @@ class LLSelfSitOrStand : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
if (gAgent.getAvatarObject() && gAgent.getAvatarObject()->mIsSitting)
|
||||
if (gAgent.getAvatarObject() && gAgent.getAvatarObject()->isSitting())
|
||||
{
|
||||
// [RLVa:KB] - Alternate: Snowglobe-1.3.X | Checked: 2009-12-29 (RLVa-1.1.0k) | Added: RLVa-1.1.0k | OK
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT))
|
||||
@@ -3540,7 +3540,7 @@ class LLSelfEnableSitOrStand : public view_listener_t
|
||||
stand_text = param.substr(offset+1);
|
||||
}
|
||||
|
||||
if (gAgent.getAvatarObject() && gAgent.getAvatarObject()->mIsSitting)
|
||||
if (gAgent.getAvatarObject() && gAgent.getAvatarObject()->isSitting())
|
||||
{
|
||||
// [RLVa:KB] - Alternate: Snowglobe-1.3.X | Checked: 2009-12-29 (RLVa-1.1.0k) | Added: RLVa-1.1.0k | OK
|
||||
new_value &= (!gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT));
|
||||
@@ -3757,7 +3757,7 @@ void handle_force_ground_sit(void*)
|
||||
{
|
||||
if (gAgent.getAvatarObject())
|
||||
{
|
||||
if(!gAgent.getAvatarObject()->mIsSitting)
|
||||
if(!gAgent.getAvatarObject()->isSitting())
|
||||
{
|
||||
gAgent.setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
|
||||
}
|
||||
@@ -3958,7 +3958,7 @@ bool handle_sit_or_stand()
|
||||
// [RLVa:KB] - Checked: 2010-08-29 (RLVa-1.1.3b) | Added: RLVa-1.2.1c | OK
|
||||
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_STANDTP)) && (gAgent.getAvatarObject()) )
|
||||
{
|
||||
if (gAgent.getAvatarObject()->mIsSitting)
|
||||
if (gAgent.getAvatarObject()->isSitting())
|
||||
{
|
||||
if (gRlvHandler.canStand())
|
||||
gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
|
||||
@@ -4075,7 +4075,7 @@ class LLWorldEnableFly : public view_listener_t
|
||||
BOOL sitting = FALSE;
|
||||
if (gAgent.getAvatarObject())
|
||||
{
|
||||
sitting = gAgent.getAvatarObject()->mIsSitting;
|
||||
sitting = gAgent.getAvatarObject()->isSitting();
|
||||
}
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(!sitting);
|
||||
return true;
|
||||
@@ -5158,7 +5158,7 @@ BOOL sitting_on_selection()
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return (avatar->mIsSitting && avatar->getRoot() == root_object);
|
||||
return (avatar->isSitting() && avatar->getRoot() == root_object);
|
||||
}
|
||||
|
||||
class LLToolsSaveToInventory : public view_listener_t
|
||||
@@ -6004,7 +6004,7 @@ class LLWorldSitOnGround : public view_listener_t
|
||||
{
|
||||
if (gAgent.getAvatarObject())
|
||||
{
|
||||
if(!gAgent.getAvatarObject()->mIsSitting)
|
||||
if(!gAgent.getAvatarObject()->isSitting())
|
||||
{
|
||||
gAgent.setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
|
||||
}
|
||||
|
||||
@@ -4945,7 +4945,7 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data)
|
||||
if (object)
|
||||
{
|
||||
LLVector3 sit_spot = object->getPositionAgent() + (sitPosition * object->getRotation());
|
||||
if (!use_autopilot || (avatar && avatar->mIsSitting && avatar->getRoot() == object->getRoot()))
|
||||
if (!use_autopilot || (avatar && avatar->isSitting() && avatar->getRoot() == object->getRoot()))
|
||||
{
|
||||
//we're already sitting on this object, so don't autopilot
|
||||
}
|
||||
|
||||
@@ -3385,7 +3385,7 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls,
|
||||
((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP))) )
|
||||
{
|
||||
LLVOAvatar* pAvatar = gAgent.getAvatarObject();
|
||||
if ( (pAvatar) && (pAvatar->mIsSitting) && (pAvatar->getRoot() == object->getRootEdit()) )
|
||||
if ( (pAvatar) && (pAvatar->isSitting()) && (pAvatar->getRoot() == object->getRootEdit()) )
|
||||
moveable_object_selected = this_object_movable = FALSE;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1430,7 +1430,7 @@ ERlvCmdRet RlvHandler::processForceCommand(const RlvCommand& rlvCmd) const
|
||||
{
|
||||
VERIFY_OPTION(rlvCmd.getOption().empty());
|
||||
LLVOAvatar* pAvatar = gAgent.getAvatarObject();
|
||||
if ( (pAvatar) && (pAvatar->mIsSitting) && (!hasBehaviourExcept(RLV_BHVR_UNSIT, rlvCmd.getObjectID())) )
|
||||
if ( (pAvatar) && (pAvatar->isSitting()) && (!hasBehaviourExcept(RLV_BHVR_UNSIT, rlvCmd.getObjectID())) )
|
||||
{
|
||||
gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
|
||||
send_agent_update(TRUE, TRUE); // See behaviour notes on why we have to force an agent update here
|
||||
@@ -1577,7 +1577,7 @@ ERlvCmdRet RlvHandler::onForceSit(const RlvCommand& rlvCmd) const
|
||||
return RLV_RET_FAILED_LOCK;
|
||||
else if ( (hasBehaviour(RLV_BHVR_STANDTP)) && (gAgent.getAvatarObject()) )
|
||||
{
|
||||
if (gAgent.getAvatarObject()->mIsSitting)
|
||||
if (gAgent.getAvatarObject()->isSitting())
|
||||
return RLV_RET_FAILED_LOCK;
|
||||
m_posSitSource = gAgent.getPositionGlobal();
|
||||
}
|
||||
@@ -1692,7 +1692,7 @@ ERlvCmdRet RlvHandler::processReplyCommand(const RlvCommand& rlvCmd) const
|
||||
{
|
||||
// NOTE: RLV 1.16.1 returns a NULL UUID if we're not sitting
|
||||
LLVOAvatar* pAvatar = gAgent.getAvatarObject(); LLUUID idSitObj;
|
||||
if ( (pAvatar) && (pAvatar->mIsSitting) )
|
||||
if ( (pAvatar) && (pAvatar->isSitting()) )
|
||||
{
|
||||
// LLVOAvatar inherits from 2 classes so make sure we get the right vfptr
|
||||
LLViewerObject* pAvatarObj = dynamic_cast<LLViewerObject*>(pAvatar), *pParent;
|
||||
|
||||
@@ -243,7 +243,7 @@ inline bool RlvHandler::canSit(LLViewerObject* pObj, const LLVector3& posOffset
|
||||
( (pObj) && (LL_PCODE_VOLUME == pObj->getPCode()) ) &&
|
||||
(!hasBehaviour(RLV_BHVR_SIT)) &&
|
||||
( ((!hasBehaviour(RLV_BHVR_UNSIT)) && (!hasBehaviour(RLV_BHVR_STANDTP))) ||
|
||||
((gAgent.getAvatarObject()) && (!gAgent.getAvatarObject()->mIsSitting)) ) &&
|
||||
((gAgent.getAvatarObject()) && (!gAgent.getAvatarObject()->isSitting())) ) &&
|
||||
( ((NULL == getCurrentCommand() || (RLV_BHVR_SIT != getCurrentCommand()->getBehaviourType()))
|
||||
? ((!hasBehaviour(RLV_BHVR_SITTP)) && (!hasBehaviour(RLV_BHVR_FARTOUCH))) // [regular sit]
|
||||
: (!hasBehaviourExcept(RLV_BHVR_SITTP, getCurrentObject()))) || // [force sit]
|
||||
@@ -254,7 +254,7 @@ inline bool RlvHandler::canSit(LLViewerObject* pObj, const LLVector3& posOffset
|
||||
inline bool RlvHandler::canStand() const
|
||||
{
|
||||
// NOTE: return FALSE only if we're @unsit=n restricted and the avie is currently sitting on something and TRUE for everything else
|
||||
return (!hasBehaviour(RLV_BHVR_UNSIT)) || ((gAgent.getAvatarObject()) && (!gAgent.getAvatarObject()->mIsSitting));
|
||||
return (!hasBehaviour(RLV_BHVR_UNSIT)) || ((gAgent.getAvatarObject()) && (!gAgent.getAvatarObject()->isSitting()));
|
||||
}
|
||||
|
||||
// Checked: 2010-12-11 (RLVa-1.2.2c) | Added: RLVa-1.2.2c
|
||||
|
||||
Reference in New Issue
Block a user