Buncha pointless sync and cleanup

This commit is contained in:
Lirusaito
2016-05-27 12:17:30 -04:00
parent 8f14d86a5e
commit f33429f1bb
26 changed files with 253 additions and 206 deletions

View File

@@ -81,6 +81,7 @@ public:
~LLAvatarBoneInfo() ~LLAvatarBoneInfo()
{ {
std::for_each(mChildList.begin(), mChildList.end(), DeletePointer()); std::for_each(mChildList.begin(), mChildList.end(), DeletePointer());
mChildList.clear();
} }
BOOL parseXml(LLXmlTreeNode* node); BOOL parseXml(LLXmlTreeNode* node);
@@ -108,6 +109,7 @@ public:
~LLAvatarSkeletonInfo() ~LLAvatarSkeletonInfo()
{ {
std::for_each(mBoneInfoList.begin(), mBoneInfoList.end(), DeletePointer()); std::for_each(mBoneInfoList.begin(), mBoneInfoList.end(), DeletePointer());
mBoneInfoList.clear();
} }
BOOL parseXml(LLXmlTreeNode* node); BOOL parseXml(LLXmlTreeNode* node);
S32 getNumBones() const { return mNumBones; } S32 getNumBones() const { return mNumBones; }
@@ -132,14 +134,25 @@ LLAvatarAppearance::LLAvatarXmlInfo::LLAvatarXmlInfo()
LLAvatarAppearance::LLAvatarXmlInfo::~LLAvatarXmlInfo() LLAvatarAppearance::LLAvatarXmlInfo::~LLAvatarXmlInfo()
{ {
std::for_each(mMeshInfoList.begin(), mMeshInfoList.end(), DeletePointer()); std::for_each(mMeshInfoList.begin(), mMeshInfoList.end(), DeletePointer());
mMeshInfoList.clear();
std::for_each(mSkeletalDistortionInfoList.begin(), mSkeletalDistortionInfoList.end(), DeletePointer()); std::for_each(mSkeletalDistortionInfoList.begin(), mSkeletalDistortionInfoList.end(), DeletePointer());
mSkeletalDistortionInfoList.clear();
std::for_each(mAttachmentInfoList.begin(), mAttachmentInfoList.end(), DeletePointer()); std::for_each(mAttachmentInfoList.begin(), mAttachmentInfoList.end(), DeletePointer());
mAttachmentInfoList.clear();
delete_and_clear(mTexSkinColorInfo); delete_and_clear(mTexSkinColorInfo);
delete_and_clear(mTexHairColorInfo); delete_and_clear(mTexHairColorInfo);
delete_and_clear(mTexEyeColorInfo); delete_and_clear(mTexEyeColorInfo);
std::for_each(mLayerInfoList.begin(), mLayerInfoList.end(), DeletePointer()); std::for_each(mLayerInfoList.begin(), mLayerInfoList.end(), DeletePointer());
mLayerInfoList.clear();
std::for_each(mDriverInfoList.begin(), mDriverInfoList.end(), DeletePointer()); std::for_each(mDriverInfoList.begin(), mDriverInfoList.end(), DeletePointer());
mDriverInfoList.clear();
std::for_each(mMorphMaskInfoList.begin(), mMorphMaskInfoList.end(), DeletePointer()); std::for_each(mMorphMaskInfoList.begin(), mMorphMaskInfoList.end(), DeletePointer());
mMorphMaskInfoList.clear();
} }

View File

@@ -161,7 +161,7 @@ void LLPolyMeshSharedData::freeMeshData()
// mVertFaceMap.deleteAllData(); // mVertFaceMap.deleteAllData();
} }
// compate_int is used by the qsort function to sort the index array // compare_int is used by the qsort function to sort the index array
S32 compare_int(const void *a, const void *b); S32 compare_int(const void *a, const void *b);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@@ -135,6 +135,7 @@ LLTexGlobalColorInfo::LLTexGlobalColorInfo()
LLTexGlobalColorInfo::~LLTexGlobalColorInfo() LLTexGlobalColorInfo::~LLTexGlobalColorInfo()
{ {
for_each(mParamColorInfoList.begin(), mParamColorInfoList.end(), DeletePointer()); for_each(mParamColorInfoList.begin(), mParamColorInfoList.end(), DeletePointer());
mParamColorInfoList.clear();
} }
BOOL LLTexGlobalColorInfo::parseXml(LLXmlTreeNode* node) BOOL LLTexGlobalColorInfo::parseXml(LLXmlTreeNode* node)

View File

@@ -47,7 +47,6 @@ using namespace LLAvatarAppearanceDefines;
LLWearable* LLWearableData::getWearable(const LLWearableType::EType type, U32 index) LLWearable* LLWearableData::getWearable(const LLWearableType::EType type, U32 index)
{ {
//llassert_always(index == 0);
wearableentry_map_t::iterator wearable_iter = mWearableDatas.find(type); wearableentry_map_t::iterator wearable_iter = mWearableDatas.find(type);
if (wearable_iter == mWearableDatas.end()) if (wearable_iter == mWearableDatas.end())
{ {
@@ -66,7 +65,6 @@ LLWearable* LLWearableData::getWearable(const LLWearableType::EType type, U32 in
void LLWearableData::setWearable(const LLWearableType::EType type, U32 index, LLWearable *wearable) void LLWearableData::setWearable(const LLWearableType::EType type, U32 index, LLWearable *wearable)
{ {
//llassert_always(index == 0);
LLWearable *old_wearable = getWearable(type,index); LLWearable *old_wearable = getWearable(type,index);
if (!old_wearable) if (!old_wearable)
{ {

View File

@@ -100,10 +100,10 @@ LLWearableDictionary::LLWearableDictionary()
addEntry(LLWearableType::WT_ALPHA, new WearableEntry("alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_ALPHA, FALSE, TRUE)); addEntry(LLWearableType::WT_ALPHA, new WearableEntry("alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_ALPHA, FALSE, TRUE));
addEntry(LLWearableType::WT_TATTOO, new WearableEntry("tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_TATTOO, FALSE, TRUE)); addEntry(LLWearableType::WT_TATTOO, new WearableEntry("tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_TATTOO, FALSE, TRUE));
// addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, TRUE));
// [SL:KB] - Patch: Appearance-Misc | Checked: 2011-05-29 (Catznip-2.6) // [SL:KB] - Patch: Appearance-Misc | Checked: 2011-05-29 (Catznip-2.6)
addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, FALSE)); addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, FALSE));
// [/SL:KB] // [/SL:KB]
// addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, TRUE));
addEntry(LLWearableType::WT_UNKNOWN, new WearableEntry("unknown", "Clothing", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNKNOWN, FALSE, TRUE)); addEntry(LLWearableType::WT_UNKNOWN, new WearableEntry("unknown", "Clothing", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNKNOWN, FALSE, TRUE));
addEntry(LLWearableType::WT_INVALID, new WearableEntry("invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_NONE, FALSE, FALSE)); addEntry(LLWearableType::WT_INVALID, new WearableEntry("invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_NONE, FALSE, FALSE));

View File

@@ -912,7 +912,6 @@ P(blockingLLSDPost);
P(blockingLLSDGet); P(blockingLLSDGet);
P(blockingRawGet); P(blockingRawGet);
P(classifiedStatsResponder); P(classifiedStatsResponder);
P(createInventoryCategoryResponder);
P(emeraldDicDownloader); P(emeraldDicDownloader);
P(environmentApplyResponder); P(environmentApplyResponder);
P(environmentRequestResponder); P(environmentRequestResponder);

View File

@@ -290,9 +290,24 @@ bool LLAgent::isActionAllowed(const LLSD& sdname)
if (param == "speak") if (param == "speak")
{ {
if ( gAgent.isVoiceConnected() && bool allow_agent_voice = false;
LLViewerParcelMgr::getInstance()->allowAgentVoice() && LLVoiceChannel* channel = LLVoiceChannel::getCurrentVoiceChannel();
! LLVoiceClient::getInstance()->inTuningMode() ) if (channel != NULL)
{
if (channel->getSessionName().empty() && channel->getSessionID().isNull())
{
// default channel
allow_agent_voice = LLViewerParcelMgr::getInstance()->allowAgentVoice();
}
else
{
allow_agent_voice = channel->isActive() && channel->callStarted();
}
}
if (gAgent.isVoiceConnected() &&
allow_agent_voice &&
!LLVoiceClient::getInstance()->inTuningMode())
{ {
retval = true; retval = true;
} }
@@ -405,6 +420,7 @@ LLAgent::LLAgent() :
mAutoPilot(FALSE), mAutoPilot(FALSE),
mAutoPilotFlyOnStop(FALSE), mAutoPilotFlyOnStop(FALSE),
mAutoPilotAllowFlying(TRUE),
mAutoPilotTargetGlobal(), mAutoPilotTargetGlobal(),
mAutoPilotStopDistance(1.f), mAutoPilotStopDistance(1.f),
mAutoPilotUseRotation(FALSE), mAutoPilotUseRotation(FALSE),
@@ -415,6 +431,8 @@ LLAgent::LLAgent() :
mAutoPilotFinishedCallback(NULL), mAutoPilotFinishedCallback(NULL),
mAutoPilotCallbackData(NULL), mAutoPilotCallbackData(NULL),
mMovementKeysLocked(FALSE),
mEffectColor(new LLColor4(0.f, 1.f, 1.f, 1.f)), mEffectColor(new LLColor4(0.f, 1.f, 1.f, 1.f)),
mHaveHomePosition(FALSE), mHaveHomePosition(FALSE),
@@ -425,7 +443,8 @@ LLAgent::LLAgent() :
mCurrentFidget(0), mCurrentFidget(0),
mCrouch(false), mCrouch(false),
mFirstLogin(FALSE), mFirstLogin(FALSE),
mGenderChosen(FALSE), mOutfitChosen(FALSE),
mAppearanceSerialNum(0), mAppearanceSerialNum(0),
mMouselookModeInSignal(NULL), mMouselookModeInSignal(NULL),
@@ -995,6 +1014,15 @@ BOOL LLAgent::inPrelude()
} }
std::string LLAgent::getRegionCapability(const std::string &name)
{
if (!mRegionp)
return std::string();
return mRegionp->getCapability(name);
}
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// canManageEstate() // canManageEstate()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -1518,17 +1546,25 @@ void LLAgent::startAutoPilotGlobal(
void (*finish_callback)(BOOL, void *), void (*finish_callback)(BOOL, void *),
void *callback_data, void *callback_data,
F32 stop_distance, F32 stop_distance,
F32 rot_threshold) F32 rot_threshold,
BOOL allow_flying)
{ {
if (!isAgentAvatarValid()) if (!isAgentAvatarValid())
{ {
return; return;
} }
// Are there any pending callbacks from previous auto pilot requests?
if (mAutoPilotFinishedCallback)
{
mAutoPilotFinishedCallback(dist_vec(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < mAutoPilotStopDistance, mAutoPilotCallbackData);
}
mAutoPilotFinishedCallback = finish_callback; mAutoPilotFinishedCallback = finish_callback;
mAutoPilotCallbackData = callback_data; mAutoPilotCallbackData = callback_data;
mAutoPilotRotationThreshold = rot_threshold; mAutoPilotRotationThreshold = rot_threshold;
mAutoPilotBehaviorName = behavior_name; mAutoPilotBehaviorName = behavior_name;
mAutoPilotAllowFlying = allow_flying;
LLVector3d delta_pos( target_global ); LLVector3d delta_pos( target_global );
delta_pos -= getPositionGlobal(); delta_pos -= getPositionGlobal();
@@ -1556,14 +1592,23 @@ void LLAgent::startAutoPilotGlobal(
} }
} }
mAutoPilotFlyOnStop = getFlying(); if (mAutoPilotAllowFlying)
{
mAutoPilotFlyOnStop = getFlying();
}
else
{
mAutoPilotFlyOnStop = FALSE;
}
if (distance > 30.0) if (distance > 30.0 && mAutoPilotAllowFlying)
{ {
setFlying(TRUE); setFlying(TRUE);
} }
if ( distance > 1.f && heightDelta > (sqrtf(mAutoPilotStopDistance) + 1.f)) if ( distance > 1.f &&
mAutoPilotAllowFlying &&
heightDelta > (sqrtf(mAutoPilotStopDistance) + 1.f))
{ {
setFlying(TRUE); setFlying(TRUE);
// Do not force flying for "Sit" behavior to prevent flying after pressing "Stand" // Do not force flying for "Sit" behavior to prevent flying after pressing "Stand"
@@ -1620,10 +1665,8 @@ void LLAgent::setAutoPilotTargetGlobal(const LLVector3d &target_global)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// startFollowPilot() // startFollowPilot()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void LLAgent::startFollowPilot(const LLUUID &leader_id) void LLAgent::startFollowPilot(const LLUUID &leader_id, BOOL allow_flying, F32 stop_distance)
{ {
if (!mAutoPilot) return;
mLeaderID = leader_id; mLeaderID = leader_id;
if ( mLeaderID.isNull() ) return; if ( mLeaderID.isNull() ) return;
@@ -1634,7 +1677,14 @@ void LLAgent::startFollowPilot(const LLUUID &leader_id)
return; return;
} }
startAutoPilotGlobal(object->getPositionGlobal()); startAutoPilotGlobal(object->getPositionGlobal(),
std::string(), // behavior_name
NULL, // target_rotation
NULL, // finish_callback
NULL, // callback_data
stop_distance,
0.03f, // rotation_threshold
allow_flying);
} }
@@ -1701,7 +1751,7 @@ void LLAgent::autoPilot(F32 *delta_yaw)
if (!isAgentAvatarValid()) return; if (!isAgentAvatarValid()) return;
if (gAgentAvatarp->mInAir) if (gAgentAvatarp->mInAir && mAutoPilotAllowFlying)
{ {
setFlying(TRUE); setFlying(TRUE);
} }
@@ -1761,7 +1811,7 @@ void LLAgent::autoPilot(F32 *delta_yaw)
*delta_yaw = yaw; *delta_yaw = yaw;
// Compute when to start slowing down and when to stop // Compute when to start slowing down
F32 slow_distance; F32 slow_distance;
if (getFlying()) if (getFlying())
{ {
@@ -1921,7 +1971,7 @@ BOOL LLAgent::needsRenderAvatar()
return FALSE; return FALSE;
} }
return mShowAvatar && mGenderChosen; return mShowAvatar && mOutfitChosen;
} }
// TRUE if we need to render your own avatar's head. // TRUE if we need to render your own avatar's head.
@@ -2831,11 +2881,6 @@ LLAgent::god_level_change_slot_t LLAgent::registerGodLevelChanageListener(god_le
return mGodLevelChangeSignal.connect(pGodLevelChangeCallback); return mGodLevelChangeSignal.connect(pGodLevelChangeCallback);
} }
void LLAgent::setAOTransition()
{
mAgentAccess->setTransition();
}
const LLAgentAccess& LLAgent::getAgentAccess() const LLAgentAccess& LLAgent::getAgentAccess()
{ {
return *mAgentAccess; return *mAgentAccess;
@@ -2853,11 +2898,7 @@ void LLAgent::handleMaturity(const LLSD &pNewValue)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void LLAgent::buildFullname(std::string& name) const //*TODO remove, is not used anywhere as of August 20, 2009
{
if (isAgentAvatarValid()) name = gAgentAvatarp->getFullname();
}
void LLAgent::buildFullnameAndTitle(std::string& name) const void LLAgent::buildFullnameAndTitle(std::string& name) const
{ {
if (isGroupMember()) if (isGroupMember())
@@ -3261,29 +3302,6 @@ BOOL LLAgent::allowOperation(PermissionBit op,
return perm.allowOperationBy(op, agent_proxy, group_proxy); return perm.allowOperationBy(op, agent_proxy, group_proxy);
} }
void LLAgent::getName(std::string& name)
{
name.clear();
if (gAgentAvatarp)
{
LLNameValue *first_nv = gAgentAvatarp->getNVPair("FirstName");
LLNameValue *last_nv = gAgentAvatarp->getNVPair("LastName");
if (first_nv && last_nv)
{
name = first_nv->printData() + " " + last_nv->printData();
}
else
{
LL_WARNS() << "Agent is missing FirstName and/or LastName nv pair." << LL_ENDL;
}
}
else
{
name = gSavedSettings.getString("FirstName") + " " + gSavedSettings.getString("LastName");
}
}
const LLColor4 LLAgent::getEffectColor() const LLColor4 LLAgent::getEffectColor()
{ {
LLColor4 effect_color = *mEffectColor; LLColor4 effect_color = *mEffectColor;
@@ -3318,6 +3336,13 @@ BOOL LLAgent::leftButtonGrabbed() const
|| (camera_mouse_look && mControlsTakenPassedOnCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0); || (camera_mouse_look && mControlsTakenPassedOnCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0);
} }
BOOL LLAgent::leftButtonBlocked() const
{
const BOOL camera_mouse_look = gAgentCamera.cameraMouselook();
return (!camera_mouse_look && mControlsTakenCount[CONTROL_LBUTTON_DOWN_INDEX] > 0)
|| (camera_mouse_look && mControlsTakenCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0);
}
BOOL LLAgent::rotateGrabbed() const BOOL LLAgent::rotateGrabbed() const
{ {
return (mControlsTakenCount[CONTROL_YAW_POS_INDEX] > 0) return (mControlsTakenCount[CONTROL_YAW_POS_INDEX] > 0)
@@ -3863,6 +3888,13 @@ BOOL LLAgent::anyControlGrabbed() const
} }
BOOL LLAgent::isControlGrabbed(S32 control_index) const BOOL LLAgent::isControlGrabbed(S32 control_index) const
{
if (gAgent.mControlsTakenCount[control_index] > 0)
return TRUE;
return gAgent.mControlsTakenPassedOnCount[control_index] > 0;
}
BOOL LLAgent::isControlBlocked(S32 control_index) const
{ {
return mControlsTakenCount[control_index] > 0; return mControlsTakenCount[control_index] > 0;
} }
@@ -4215,11 +4247,24 @@ void LLAgent::teleportCancel()
msg->addUUIDFast(_PREHASH_SessionID, getSessionID()); msg->addUUIDFast(_PREHASH_SessionID, getSessionID());
sendReliableMessage(); sendReliableMessage();
} }
mTeleportCanceled = mTeleportRequest;
} }
clearTeleportRequest(); clearTeleportRequest();
gAgent.setTeleportState( LLAgent::TELEPORT_NONE ); gAgent.setTeleportState( LLAgent::TELEPORT_NONE );
gPipeline.resetVertexBuffers();
} }
void LLAgent::restoreCanceledTeleportRequest()
{
if (mTeleportCanceled != NULL)
{
gAgent.setTeleportState( LLAgent::TELEPORT_REQUESTED );
mTeleportRequest = mTeleportCanceled;
mTeleportCanceled.reset();
gTeleportDisplay = TRUE;
gTeleportDisplayTimer.reset();
}
}
void LLAgent::teleportViaLocation(const LLVector3d& pos_global) void LLAgent::teleportViaLocation(const LLVector3d& pos_global)
{ {
@@ -4324,7 +4369,11 @@ void LLAgent::teleportViaLocationLookAt(const LLVector3d& pos_global)
void LLAgent::doTeleportViaLocationLookAt(const LLVector3d& pos_global) void LLAgent::doTeleportViaLocationLookAt(const LLVector3d& pos_global)
{ {
mbTeleportKeepsLookAt = true; mbTeleportKeepsLookAt = true;
gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); // detach camera form avatar, so it keeps direction
if(!gAgentCamera.isfollowCamLocked())
{
gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); // detach camera form avatar, so it keeps direction
}
U64 region_handle = to_region_handle(pos_global); U64 region_handle = to_region_handle(pos_global);
// <FS:CR> Aurora-sim var region teleports // <FS:CR> Aurora-sim var region teleports
LLSimInfo* simInfo = LLWorldMap::instance().simInfoFromHandle(region_handle); LLSimInfo* simInfo = LLWorldMap::instance().simInfoFromHandle(region_handle);
@@ -4337,8 +4386,22 @@ void LLAgent::doTeleportViaLocationLookAt(const LLVector3d& pos_global)
teleportRequest(region_handle, pos_local, getTeleportKeepsLookAt()); teleportRequest(region_handle, pos_local, getTeleportKeepsLookAt());
} }
LLAgent::ETeleportState LLAgent::getTeleportState() const
{
return (mTeleportRequest && (mTeleportRequest->getStatus() == LLTeleportRequest::kFailed)) ?
TELEPORT_NONE : mTeleportState;
}
void LLAgent::setTeleportState(ETeleportState state) void LLAgent::setTeleportState(ETeleportState state)
{ {
if (mTeleportRequest && (state != TELEPORT_NONE) && (mTeleportRequest->getStatus() == LLTeleportRequest::kFailed))
{ // A late message has come in regarding a failed teleport.
// We have already decided that it failed so should not reinitiate the teleport sequence in the viewer.
LL_WARNS("Teleport") << "Attempt to set teleport state to " << state <<
" for previously failed teleport. Ignore!" << LL_ENDL;
return;
}
mTeleportState = state; mTeleportState = state;
static const LLCachedControl<bool> freeze_time("FreezeTime",false); static const LLCachedControl<bool> freeze_time("FreezeTime",false);
if (mTeleportState > TELEPORT_NONE && freeze_time) if (mTeleportState > TELEPORT_NONE && freeze_time)

View File

@@ -46,10 +46,7 @@
#include "llinventorymodel.h" #include "llinventorymodel.h"
#include "v3dmath.h" #include "v3dmath.h"
#ifndef BOOST_FUNCTION_HPP_INCLUDED
#include <boost/function.hpp> #include <boost/function.hpp>
#define BOOST_FUNCTION_HPP_INCLUDED
#endif
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <boost/signals2.hpp> #include <boost/signals2.hpp>
@@ -124,6 +121,8 @@ public:
void init(); void init();
void cleanup(); void cleanup();
private:
//-------------------------------------------------------------------- //--------------------------------------------------------------------
// Login // Login
//-------------------------------------------------------------------- //--------------------------------------------------------------------
@@ -165,8 +164,6 @@ public:
// Name // Name
//-------------------------------------------------------------------- //--------------------------------------------------------------------
public: public:
void getName(std::string& name); //Legacy
void buildFullname(std::string &name) const; //Legacy
//*TODO remove, is not used as of August 20, 2009 //*TODO remove, is not used as of August 20, 2009
void buildFullnameAndTitle(std::string &name) const; void buildFullnameAndTitle(std::string &name) const;
@@ -174,12 +171,13 @@ public:
// Gender // Gender
//-------------------------------------------------------------------- //--------------------------------------------------------------------
public: public:
// On the very first login, gender isn't chosen until the user clicks // On the very first login, outfit needs to be chosen by some
// in a dialog. We don't render the avatar until they choose. // mechanism, usually by loading the requested initial outfit. We
BOOL isGenderChosen() const { return mGenderChosen; } // don't render the avatar until the choice is made.
void setGenderChosen(BOOL b) { mGenderChosen = b; } BOOL isOutfitChosen() const { return mOutfitChosen; }
void setOutfitChosen(BOOL b) { mOutfitChosen = b; }
private: private:
BOOL mGenderChosen; BOOL mOutfitChosen;
/** Identity /** Identity
** ** ** **
@@ -266,6 +264,9 @@ public:
const LLHost& getRegionHost() const; const LLHost& getRegionHost() const;
BOOL inPrelude(); BOOL inPrelude();
// Capability
std::string getRegionCapability(const std::string &name); // short hand for if (getRegion()) { getRegion()->getCapability(name) }
/** /**
* Register a boost callback to be called when the agent changes regions * Register a boost callback to be called when the agent changes regions
* Note that if you need to access a capability for the region, you may need to wait * Note that if you need to access a capability for the region, you may need to wait
@@ -485,6 +486,7 @@ private:
//-------------------------------------------------------------------- //--------------------------------------------------------------------
public: public:
BOOL leftButtonGrabbed() const; BOOL leftButtonGrabbed() const;
BOOL leftButtonBlocked() const;
BOOL rotateGrabbed() const; BOOL rotateGrabbed() const;
BOOL forwardGrabbed() const; BOOL forwardGrabbed() const;
BOOL backwardGrabbed() const; BOOL backwardGrabbed() const;
@@ -496,13 +498,14 @@ public:
//-------------------------------------------------------------------- //--------------------------------------------------------------------
public: public:
U32 getControlFlags(); U32 getControlFlags();
void setControlFlags(U32 mask); // performs bitwise mControlFlags |= mask void setControlFlags(U32 mask); // Performs bitwise mControlFlags |= mask
void clearControlFlags(U32 mask); // performs bitwise mControlFlags &= ~mask void clearControlFlags(U32 mask); // Performs bitwise mControlFlags &= ~mask
BOOL controlFlagsDirty() const; BOOL controlFlagsDirty() const;
void enableControlFlagReset(); void enableControlFlagReset();
void resetControlFlags(); void resetControlFlags();
BOOL anyControlGrabbed() const; // True iff a script has taken over a control BOOL anyControlGrabbed() const; // True if a script has taken over any control
BOOL isControlGrabbed(S32 control_index) const; BOOL isControlGrabbed(S32 control_index) const; // True if a script has taken over a control
BOOL isControlBlocked(S32 control_index) const; // Control should be ignored or won't be passed
// Send message to simulator to force grabbed controls to be // Send message to simulator to force grabbed controls to be
// released, in case of a poorly written script. // released, in case of a poorly written script.
void forceReleaseControls(); void forceReleaseControls();
@@ -567,6 +570,9 @@ public:
void moveYaw(F32 mag, bool reset_view = true); void moveYaw(F32 mag, bool reset_view = true);
void movePitch(F32 mag); void movePitch(F32 mag);
BOOL isMovementLocked() const { return mMovementKeysLocked; }
void setMovementLocked(BOOL set_locked) { mMovementKeysLocked = set_locked; }
//-------------------------------------------------------------------- //--------------------------------------------------------------------
// Move the avatar's frame // Move the avatar's frame
//-------------------------------------------------------------------- //--------------------------------------------------------------------
@@ -599,8 +605,9 @@ public:
const std::string& behavior_name = std::string(), const std::string& behavior_name = std::string(),
const LLQuaternion *target_rotation = NULL, const LLQuaternion *target_rotation = NULL,
void (*finish_callback)(BOOL, void *) = NULL, void *callback_data = NULL, void (*finish_callback)(BOOL, void *) = NULL, void *callback_data = NULL,
F32 stop_distance = 0.f, F32 rotation_threshold = 0.03f); F32 stop_distance = 0.f, F32 rotation_threshold = 0.03f,
void startFollowPilot(const LLUUID &leader_id); BOOL allow_flying = TRUE);
void startFollowPilot(const LLUUID &leader_id, BOOL allow_flying = TRUE, F32 stop_distance = 0.5f);
void stopAutoPilot(BOOL user_cancel = FALSE); void stopAutoPilot(BOOL user_cancel = FALSE);
void setAutoPilotTargetGlobal(const LLVector3d &target_global); void setAutoPilotTargetGlobal(const LLVector3d &target_global);
void autoPilot(F32 *delta_yaw); // Autopilot walking action, angles in radians void autoPilot(F32 *delta_yaw); // Autopilot walking action, angles in radians
@@ -608,6 +615,7 @@ public:
private: private:
BOOL mAutoPilot; BOOL mAutoPilot;
BOOL mAutoPilotFlyOnStop; BOOL mAutoPilotFlyOnStop;
BOOL mAutoPilotAllowFlying;
LLVector3d mAutoPilotTargetGlobal; LLVector3d mAutoPilotTargetGlobal;
F32 mAutoPilotStopDistance; F32 mAutoPilotStopDistance;
BOOL mAutoPilotUseRotation; BOOL mAutoPilotUseRotation;
@@ -619,6 +627,7 @@ private:
void (*mAutoPilotFinishedCallback)(BOOL, void *); void (*mAutoPilotFinishedCallback)(BOOL, void *);
void* mAutoPilotCallbackData; void* mAutoPilotCallbackData;
LLUUID mLeaderID; LLUUID mLeaderID;
BOOL mMovementKeysLocked;
/** Movement /** Movement
** ** ** **
@@ -662,6 +671,7 @@ public:
void teleportViaLocation(const LLVector3d& pos_global); // To a global location - this will probably need to be deprecated void teleportViaLocation(const LLVector3d& pos_global); // To a global location - this will probably need to be deprecated
void teleportViaLocationLookAt(const LLVector3d& pos_global);// To a global location, preserving camera rotation void teleportViaLocationLookAt(const LLVector3d& pos_global);// To a global location, preserving camera rotation
void teleportCancel(); // May or may not be allowed by server void teleportCancel(); // May or may not be allowed by server
void restoreCanceledTeleportRequest();
bool getTeleportKeepsLookAt() { return mbTeleportKeepsLookAt; } // Whether look-at reset after teleport bool getTeleportKeepsLookAt() { return mbTeleportKeepsLookAt; } // Whether look-at reset after teleport
protected: protected:
bool teleportCore(bool is_local = false); // Stuff for all teleports; returns true if the teleport can proceed bool teleportCore(bool is_local = false); // Stuff for all teleports; returns true if the teleport can proceed
@@ -684,6 +694,7 @@ private:
friend class LLTeleportRequestViaLocationLookAt; friend class LLTeleportRequestViaLocationLookAt;
LLTeleportRequestPtr mTeleportRequest; LLTeleportRequestPtr mTeleportRequest;
LLTeleportRequestPtr mTeleportCanceled;
boost::signals2::connection mTeleportFinishedSlot; boost::signals2::connection mTeleportFinishedSlot;
boost::signals2::connection mTeleportFailedSlot; boost::signals2::connection mTeleportFailedSlot;
@@ -710,7 +721,7 @@ public:
// Teleport State // Teleport State
//-------------------------------------------------------------------- //--------------------------------------------------------------------
public: public:
ETeleportState getTeleportState() const { return mTeleportState; } ETeleportState getTeleportState() const;
void setTeleportState(ETeleportState state); void setTeleportState(ETeleportState state);
private: private:
ETeleportState mTeleportState; ETeleportState mTeleportState;
@@ -752,8 +763,6 @@ public:
const LLAgentAccess& getAgentAccess(); const LLAgentAccess& getAgentAccess();
BOOL canManageEstate() const; BOOL canManageEstate() const;
BOOL getAdminOverride() const; BOOL getAdminOverride() const;
// ! BACKWARDS COMPATIBILITY ! This function can go away after the AO transition (see llstartup.cpp).
void setAOTransition();
private: private:
LLAgentAccess * mAgentAccess; LLAgentAccess * mAgentAccess;

View File

@@ -4905,7 +4905,7 @@ public:
LLAppearanceMgr::getInstance()->wearInventoryCategory(category, true, false); LLAppearanceMgr::getInstance()->wearInventoryCategory(category, true, false);
// *TODOw: This may not be necessary if initial outfit is chosen already -- josh // *TODOw: This may not be necessary if initial outfit is chosen already -- josh
gAgent.setGenderChosen(TRUE); gAgent.setOutfitChosen(TRUE);
} }
} }

View File

@@ -85,6 +85,9 @@
#include "llprogressview.h" #include "llprogressview.h"
#include "llvocache.h" #include "llvocache.h"
#include "llvopartgroup.h" #include "llvopartgroup.h"
// [SL:KB] - Patch: Appearance-Misc | Checked: 2013-02-12 (Catznip-3.4)
#include "llappearancemgr.h"
// [/SL:KB]
#include "llfloaterteleporthistory.h" #include "llfloaterteleporthistory.h"
#include "llcrashlogger.h" #include "llcrashlogger.h"
#include "llweb.h" #include "llweb.h"
@@ -198,9 +201,6 @@
// [RLVa:KB] // [RLVa:KB]
#include "rlvhandler.h" #include "rlvhandler.h"
// [/RLVa:KB] // [/RLVa:KB]
// [SL:KB] - Patch: Appearance-Misc | Checked: 2013-02-12 (Catznip-3.4)
#include "llappearancemgr.h"
// [/SL:KB]
// *FIX: These extern globals should be cleaned up. // *FIX: These extern globals should be cleaned up.
// The globals either represent state/config/resource-storage of either // The globals either represent state/config/resource-storage of either

View File

@@ -41,6 +41,7 @@
#include "lldir.h" #include "lldir.h"
#include "llagent.h" #include "llagent.h"
#include "llagentui.h"
#include "llui.h" #include "llui.h"
#include "lllineeditor.h" #include "lllineeditor.h"
#include "llviewertexteditor.h" #include "llviewertexteditor.h"
@@ -128,7 +129,7 @@ BOOL LLFloaterPostcard::postBuild()
childDisable("from_form"); childDisable("from_form");
std::string name_string; std::string name_string;
gAgent.buildFullname(name_string); LLAgentUI::buildFullname(name_string);
childSetValue("name_form", LLSD(name_string)); childSetValue("name_form", LLSD(name_string));
LLTextEditor* MsgField = getChild<LLTextEditor>("msg_form"); LLTextEditor* MsgField = getChild<LLTextEditor>("msg_form");

View File

@@ -181,7 +181,7 @@ BOOL LLFloaterReporter::postBuild()
childSetAction("cancel_btn", onClickCancel, this); childSetAction("cancel_btn", onClickCancel, this);
// grab the user's name // grab the user's name
std::string reporter; std::string reporter;
gAgent.buildFullname(reporter); LLAgentUI::buildFullname(reporter);
getChild<LLUICtrl>("reporter_field")->setValue(reporter); getChild<LLUICtrl>("reporter_field")->setValue(reporter);
center(); center();

View File

@@ -1033,6 +1033,7 @@ void LLGestureMgr::runStep(LLMultiGesture* gesture, LLGestureStep* step)
std::string chat_text = chat_step->mChatText; std::string chat_text = chat_step->mChatText;
// Don't animate the nodding, as this might not blend with // Don't animate the nodding, as this might not blend with
// other playing animations. // other playing animations.
const BOOL animate = FALSE; const BOOL animate = FALSE;
if ( cmd_line_chat(chat_text, CHAT_TYPE_NORMAL)) if ( cmd_line_chat(chat_text, CHAT_TYPE_NORMAL))
@@ -1097,20 +1098,15 @@ void LLGestureMgr::onLoadComplete(LLVFS *vfs,
LLVFile file(vfs, asset_uuid, type, LLVFile::READ); LLVFile file(vfs, asset_uuid, type, LLVFile::READ);
S32 size = file.getSize(); S32 size = file.getSize();
char* buffer = new char[size+1]; std::vector<char> buffer(size+1);
if (buffer == NULL)
{
LL_ERRS() << "Memory Allocation Failed" << LL_ENDL;
return;
}
file.read((U8*)buffer, size); /* Flawfinder: ignore */ file.read((U8*)&buffer[0], size);
// ensure there's a trailing NULL so strlen will work. // ensure there's a trailing NULL so strlen will work.
buffer[size] = '\0'; buffer[size] = '\0';
LLMultiGesture* gesture = new LLMultiGesture(); LLMultiGesture* gesture = new LLMultiGesture();
LLDataPackerAsciiBuffer dp(buffer, size+1); LLDataPackerAsciiBuffer dp(&buffer[0], size+1);
BOOL ok = gesture->deserialize(dp); BOOL ok = gesture->deserialize(dp);
if (ok) if (ok)
@@ -1182,9 +1178,6 @@ void LLGestureMgr::onLoadComplete(LLVFS *vfs,
delete gesture; delete gesture;
gesture = NULL; gesture = NULL;
} }
delete [] buffer;
buffer = NULL;
} }
else else
{ {
@@ -1461,7 +1454,7 @@ BOOL LLGestureMgr::matchPrefix(const std::string& in_str, std::string* out_str)
#ifdef MATCH_COMMON_CHARS #ifdef MATCH_COMMON_CHARS
if (!rest_of_match.empty()) if (!rest_of_match.empty())
{ {
*out_str = in_str + rest_of_match; *out_str = in_str+rest_of_match;
return TRUE; return TRUE;
} }
#endif #endif

View File

@@ -36,6 +36,7 @@
#include "ascentkeyword.h" #include "ascentkeyword.h"
#include "llagent.h" #include "llagent.h"
#include "llagentcamera.h" #include "llagentcamera.h"
#include "llagentui.h"
#include "llautoreplace.h" #include "llautoreplace.h"
#include "llavataractions.h" #include "llavataractions.h"
#include "llavatarnamecache.h" #include "llavatarnamecache.h"
@@ -111,7 +112,7 @@ void session_starter_helper(
msg->addU32Fast(_PREHASH_Timestamp, NO_TIMESTAMP); // no timestamp necessary msg->addU32Fast(_PREHASH_Timestamp, NO_TIMESTAMP); // no timestamp necessary
std::string name; std::string name;
gAgent.buildFullname(name); LLAgentUI::buildFullname(name);
msg->addStringFast(_PREHASH_FromAgentName, name); msg->addStringFast(_PREHASH_FromAgentName, name);
msg->addStringFast(_PREHASH_Message, LLStringUtil::null); msg->addStringFast(_PREHASH_Message, LLStringUtil::null);
@@ -1114,7 +1115,7 @@ void deliver_message(const std::string& utf8_text,
{ {
std::string name; std::string name;
bool sent = false; bool sent = false;
gAgent.buildFullname(name); LLAgentUI::buildFullname(name);
const LLRelationship* info = LLAvatarTracker::instance().getBuddyInfo(other_participant_id); const LLRelationship* info = LLAvatarTracker::instance().getBuddyInfo(other_participant_id);
@@ -1302,7 +1303,7 @@ void LLFloaterIMPanel::onSendMsg()
(mOtherParticipantUUID.notNull())) (mOtherParticipantUUID.notNull()))
{ {
std::string name; std::string name;
gAgent.buildFullname(name); LLAgentUI::buildFullname(name);
// Look for actions here. // Look for actions here.
if (action) if (action)
@@ -1433,7 +1434,7 @@ void LLFloaterIMPanel::sendTypingState(bool typing)
if (mSessionType != P2P_SESSION) return; if (mSessionType != P2P_SESSION) return;
std::string name; std::string name;
gAgent.buildFullname(name); LLAgentUI::buildFullname(name);
pack_instant_message( pack_instant_message(
gMessageSystem, gMessageSystem,

View File

@@ -45,6 +45,7 @@
#include "llagent.h" #include "llagent.h"
#include "llagentcamera.h" #include "llagentcamera.h"
#include "llagentui.h"
#include "llavataractions.h" #include "llavataractions.h"
#include "llavatarnamecache.h" #include "llavatarnamecache.h"
#include "llfloaterchat.h" #include "llfloaterchat.h"
@@ -1452,7 +1453,7 @@ void leave_group_chat(const LLUUID& from_id, const LLUUID& session_id)
{ {
// Tell the server we've left group chat // Tell the server we've left group chat
std::string name; std::string name;
gAgent.buildFullname(name); LLAgentUI::buildFullname(name);
pack_instant_message(gMessageSystem, gAgentID, false, gAgentSessionID, from_id, pack_instant_message(gMessageSystem, gAgentID, false, gAgentSessionID, from_id,
name, LLStringUtil::null, IM_ONLINE, IM_SESSION_LEAVE, session_id); name, LLStringUtil::null, IM_ONLINE, IM_SESSION_LEAVE, session_id);
gAgent.sendReliableMessage(); gAgent.sendReliableMessage();

View File

@@ -1092,6 +1092,7 @@ BOOL LLInvFVBridge::isCOFFolder() const
return LLAppearanceMgr::instance().getIsInCOF(mUUID); return LLAppearanceMgr::instance().getIsInCOF(mUUID);
} }
// *TODO : Suppress isInboxFolder() once Merchant Outbox is fully deprecated
BOOL LLInvFVBridge::isInboxFolder() const BOOL LLInvFVBridge::isInboxFolder() const
{ {
const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, false); const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, false);
@@ -5839,12 +5840,8 @@ void LLWearableBridge::performAction(LLInventoryModel* model, std::string action
void LLWearableBridge::openItem() void LLWearableBridge::openItem()
{ {
LLViewerInventoryItem* item = getItem(); if (LLViewerInventoryItem* item = getItem())
if (item)
{
LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel()); LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel());
}
} }
void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)

View File

@@ -79,14 +79,13 @@
#include "llviewerwindow.h" #include "llviewerwindow.h"
#include "llvoavatarself.h" #include "llvoavatarself.h"
#include "llwearablelist.h" #include "llwearablelist.h"
#include <boost/foreach.hpp>
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a) // [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
#include "rlvhandler.h" #include "rlvhandler.h"
#include "rlvlocks.h" #include "rlvlocks.h"
// [/RLVa:KB] // [/RLVa:KB]
#include <boost/foreach.hpp>
BOOL LLInventoryState::sWearNewClothing = FALSE; BOOL LLInventoryState::sWearNewClothing = FALSE;
LLUUID LLInventoryState::sWearNewClothingTransactionID; LLUUID LLInventoryState::sWearNewClothingTransactionID;

View File

@@ -4,7 +4,7 @@
* *
* $LicenseInfo:firstyear=2002&license=viewerlgpl$ * $LicenseInfo:firstyear=2002&license=viewerlgpl$
* Second Life Viewer Source Code * Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc. * Copyright (C) 2014, Linden Research, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@@ -63,9 +63,6 @@
#include "process.h" #include "process.h"
#endif #endif
class AIHTTPTimeoutPolicy;
extern AIHTTPTimeoutPolicy createInventoryCategoryResponder_timeout;
// Increment this if the inventory contents change in a non-backwards-compatible way. // Increment this if the inventory contents change in a non-backwards-compatible way.
// For viewers with link items support, former caches are incorrect. // For viewers with link items support, former caches are incorrect.
const S32 LLInventoryModel::sCurrentInvCacheVersion = 2; const S32 LLInventoryModel::sCurrentInvCacheVersion = 2;
@@ -601,7 +598,6 @@ public:
} }
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return createInventoryCategoryResponder_timeout; }
/*virtual*/ char const* getName(void) const { return "LLCreateInventoryCategoryResponder"; } /*virtual*/ char const* getName(void) const { return "LLCreateInventoryCategoryResponder"; }
private: private:
@@ -3212,6 +3208,9 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
InventoryCallbackInfo cbinfo = (*inv_it); InventoryCallbackInfo cbinfo = (*inv_it);
gInventoryCallbacks.fire(cbinfo.mCallback, cbinfo.mInvID); gInventoryCallbacks.fire(cbinfo.mCallback, cbinfo.mInvID);
} }
//gInventory.validate();
// Don't show the inventory. We used to call showAgentInventory here. // Don't show the inventory. We used to call showAgentInventory here.
//LLPanelMainInventory* view = LLPanelMainInventory::getActiveInventory(); //LLPanelMainInventory* view = LLPanelMainInventory::getActiveInventory();
//if(view) //if(view)
@@ -3634,7 +3633,8 @@ void LLInventoryModel::dumpInventory() const
if(cat) if(cat)
{ {
LL_INFOS() << " " << cat->getUUID() << " '" << cat->getName() << "' " LL_INFOS() << " " << cat->getUUID() << " '" << cat->getName() << "' "
<< cat->getVersion() << " " << cat->getDescendentCount() << " parent: " << cat->getParentUUID() << cat->getVersion() << " " << cat->getDescendentCount()
<< " parent: " << cat->getParentUUID()
<< LL_ENDL; << LL_ENDL;
} }
else else
@@ -3974,7 +3974,11 @@ BOOL decompress_file(const char* src_filename, const char* dst_filename)
const S32 DECOMPRESS_BUFFER_SIZE = 32000; const S32 DECOMPRESS_BUFFER_SIZE = 32000;
// open the files // open the files
#if LL_WINDOWS
src = gzopen_w(utf8str_to_utf16str(src_filename).c_str(), "rb");
#else
src = gzopen(src_filename, "rb"); src = gzopen(src_filename, "rb");
#endif
if(!src) goto err_decompress; if(!src) goto err_decompress;
dst = LLFile::fopen(dst_filename, "wb"); dst = LLFile::fopen(dst_filename, "wb");
if(!dst) goto err_decompress; if(!dst) goto err_decompress;
@@ -4005,13 +4009,13 @@ BOOL decompress_file(const char* src_filename, const char* dst_filename)
#endif #endif
// If we get back a normal response, handle it here // If we get back a normal response, handle it here
void LLInventoryModel::FetchItemHttpHandler::httpSuccess(void) void LLInventoryModel::FetchItemHttpHandler::httpSuccess()
{ {
start_new_inventory_observer(); start_new_inventory_observer();
#if 0 #if 0
LLUUID agent_id; LLUUID agent_id;
agent_id = content["agent_id"].asUUID(); agent_id = mContent["agent_id"].asUUID();
if (agent_id != gAgent.getID()) if (agent_id != gAgent.getID())
{ {
LL_WARNS(LOG_INV) << "Got a inventory update for the wrong agent: " << agent_id LL_WARNS(LOG_INV) << "Got a inventory update for the wrong agent: " << agent_id
@@ -4055,6 +4059,7 @@ void LLInventoryModel::FetchItemHttpHandler::httpSuccess(void)
{ {
++update[titem->getParentUUID()]; ++update[titem->getParentUUID()];
} }
if (folder_id.isNull()) if (folder_id.isNull())
{ {
folder_id = titem->getParentUUID(); folder_id = titem->getParentUUID();
@@ -4073,7 +4078,7 @@ void LLInventoryModel::FetchItemHttpHandler::httpSuccess(void)
gViewerWindow->getWindow()->decBusyCount(); gViewerWindow->getWindow()->decBusyCount();
} }
//If we get back an error (not found, etc...), handle it here //If we get back an error (not found, etc...), handle it here
void LLInventoryModel::FetchItemHttpHandler::httpFailure(void) void LLInventoryModel::FetchItemHttpHandler::httpFailure()
{ {
LL_INFOS() << "FetchItemHttpHandler::error " LL_INFOS() << "FetchItemHttpHandler::error "
<< mStatus << ": " << mReason << LL_ENDL; << mStatus << ": " << mReason << LL_ENDL;

View File

@@ -1278,10 +1278,15 @@ void LLPanelEditWearable::saveChanges(bool force_save_as, std::string new_name)
if (link_item) if (link_item)
{ {
// Create new link // Create new link
LL_DEBUGS("Avatar") << "link refresh, creating new link to " << link_item->getLinkedUUID()
<< " removing old link at " << link_item->getUUID()
<< " wearable item id " << mWearablePtr->getItemID() << LL_ENDL;
link_inventory_object( LLAppearanceMgr::instance().getCOF(), link_inventory_object( LLAppearanceMgr::instance().getCOF(),
link_item, link_item,
NULL); NULL);
// Remove old link
remove_inventory_item(link_item, NULL); remove_inventory_item(link_item, NULL);
} }
gAgentWearables.saveWearable(mType, index, new_name); gAgentWearables.saveWearable(mType, index, new_name);

View File

@@ -2557,17 +2557,17 @@ bool idle_startup()
&& !sInitialOutfit.empty() // registration set up an outfit && !sInitialOutfit.empty() // registration set up an outfit
&& !sInitialOutfitGender.empty() // and a gender && !sInitialOutfitGender.empty() // and a gender
&& isAgentAvatarValid() // can't wear clothes without object && isAgentAvatarValid() // can't wear clothes without object
&& !gAgent.isGenderChosen() ) // nothing already loading && !gAgent.isOutfitChosen()) // nothing already loading
{ {
// Start loading the wearables, textures, gestures // Start loading the wearables, textures, gestures
LLStartUp::loadInitialOutfit( sInitialOutfit, sInitialOutfitGender ); LLStartUp::loadInitialOutfit( sInitialOutfit, sInitialOutfitGender );
} }
// If not first login, we need to fetch COF contents and // If not first login, we need to fetch COF contents and
// compute appearance from that. // compute appearance from that.
if (isAgentAvatarValid() && !gAgent.isFirstLogin() && !gAgent.isGenderChosen()) if (isAgentAvatarValid() && !gAgent.isFirstLogin() && !gAgent.isOutfitChosen())
{ {
gAgentWearables.notifyLoadingStarted(); gAgentWearables.notifyLoadingStarted();
gAgent.setGenderChosen(TRUE); gAgent.setOutfitChosen(TRUE);
gAgentWearables.sendDummyAgentWearablesUpdate(); gAgentWearables.sendDummyAgentWearablesUpdate();
callAfterCategoryFetch(LLAppearanceMgr::instance().getCOF(), set_flags_and_update_appearance); callAfterCategoryFetch(LLAppearanceMgr::instance().getCOF(), set_flags_and_update_appearance);
} }
@@ -2575,7 +2575,7 @@ bool idle_startup()
display_startup(); display_startup();
// wait precache-delay and for agent's avatar or a lot longer. // wait precache-delay and for agent's avatar or a lot longer.
if((timeout_frac > 1.f) && isAgentAvatarValid()) if ((timeout_frac > 1.f) && isAgentAvatarValid())
{ {
LLStartUp::setStartupState( STATE_WEARABLES_WAIT ); LLStartUp::setStartupState( STATE_WEARABLES_WAIT );
} }
@@ -2618,11 +2618,11 @@ bool idle_startup()
const F32 wearables_time = wearables_timer.getElapsedTimeF32(); const F32 wearables_time = wearables_timer.getElapsedTimeF32();
const F32 MAX_WEARABLES_TIME = 10.f; const F32 MAX_WEARABLES_TIME = 10.f;
if (!gAgent.isGenderChosen() && isAgentAvatarValid()) if (!gAgent.isOutfitChosen() && isAgentAvatarValid())
{ {
// No point in waiting for clothing, we don't even // No point in waiting for clothing, we don't even know
// know what gender we are. Pop a dialog to ask and // what outfit we want. Pop up a gender chooser dialog to
// proceed to draw the world. JC // ask and proceed to draw the world. JC
// //
// *NOTE: We might hit this case even if we have an // *NOTE: We might hit this case even if we have an
// initial outfit, but if the load hasn't started // initial outfit, but if the load hasn't started
@@ -2650,7 +2650,7 @@ bool idle_startup()
if (isAgentAvatarValid() if (isAgentAvatarValid()
&& gAgentAvatarp->isFullyLoaded()) && gAgentAvatarp->isFullyLoaded())
{ {
//LL_INFOS() << "avatar fully loaded" << LL_ENDL; LL_DEBUGS("Avatar") << "avatar fully loaded" << LL_ENDL;
LLStartUp::setStartupState( STATE_CLEANUP ); LLStartUp::setStartupState( STATE_CLEANUP );
return TRUE; return TRUE;
} }
@@ -2661,7 +2661,7 @@ bool idle_startup()
if ( gAgentWearables.areWearablesLoaded() ) if ( gAgentWearables.areWearablesLoaded() )
{ {
// We have our clothing, proceed. // We have our clothing, proceed.
//LL_INFOS() << "wearables loaded" << LL_ENDL; LL_DEBUGS("Avatar") << "wearables loaded" << LL_ENDL;
LLStartUp::setStartupState( STATE_CLEANUP ); LLStartUp::setStartupState( STATE_CLEANUP );
return TRUE; return TRUE;
} }
@@ -2700,7 +2700,7 @@ bool idle_startup()
gViewerWindow->getWindow()->resetBusyCount(); gViewerWindow->getWindow()->resetBusyCount();
gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW); gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW);
LL_DEBUGS("AppInit") << "Done releasing bitmap" << LL_ENDL; LL_DEBUGS("AppInit") << "Done releasing bitmap" << LL_ENDL;
//gViewerWindow->revealIntroPanel();
gViewerWindow->setStartupComplete(); gViewerWindow->setStartupComplete();
gViewerWindow->setProgressCancelButtonVisible(FALSE); gViewerWindow->setProgressCancelButtonVisible(FALSE);
display_startup(); display_startup();
@@ -3306,9 +3306,8 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
LL_DEBUGS() << "initial outfit category id: " << cat_id << LL_ENDL; LL_DEBUGS() << "initial outfit category id: " << cat_id << LL_ENDL;
} }
// This is really misnamed -- it means we have started loading gAgent.setOutfitChosen(TRUE);
// an outfit/shape that will give the avatar a gender eventually. JC gAgentWearables.sendDummyAgentWearablesUpdate();
gAgent.setGenderChosen(TRUE);
} }
//static //static
@@ -3321,10 +3320,10 @@ void LLStartUp::saveInitialOutfit()
if (sWearablesLoadedCon.connected()) if (sWearablesLoadedCon.connected())
{ {
LL_DEBUGS() << "sWearablesLoadedCon is connected, disconnecting" << LL_ENDL; LL_DEBUGS("Avatar") << "sWearablesLoadedCon is connected, disconnecting" << LL_ENDL;
sWearablesLoadedCon.disconnect(); sWearablesLoadedCon.disconnect();
} }
LL_DEBUGS() << "calling makeNewOutfitLinks( \"" << sInitialOutfit << "\" )" << LL_ENDL; LL_DEBUGS("Avatar") << "calling makeNewOutfitLinks( \"" << sInitialOutfit << "\" )" << LL_ENDL;
LLAppearanceMgr::getInstance()->makeNewOutfitLinks(sInitialOutfit,false); LLAppearanceMgr::getInstance()->makeNewOutfitLinks(sInitialOutfit,false);
} }
@@ -3991,17 +3990,6 @@ bool process_login_success_response(std::string& password, U32& first_sim_size_x
gSavedSettings.setU32("PreferredMaturity", preferredMaturity); gSavedSettings.setU32("PreferredMaturity", preferredMaturity);
} }
// During the AO transition, this flag will be true. Then the flag will
// go away. After the AO transition, this code and all the code that
// uses it can be deleted.
text = response["ao_transition"].asString();
if (!text.empty())
{
if (text == "1")
{
gAgent.setAOTransition();
}
}
text = response["start_location"].asString(); text = response["start_location"].asString();
if(!text.empty()) if(!text.empty())
@@ -4113,6 +4101,7 @@ bool process_login_success_response(std::string& password, U32& first_sim_size_x
// We don't care about this flag anymore; now base whether // We don't care about this flag anymore; now base whether
// outfit is chosen on COF contents, initial outfit // outfit is chosen on COF contents, initial outfit
// requested and available, etc. // requested and available, etc.
//gAgent.setGenderChosen(TRUE); //gAgent.setGenderChosen(TRUE);
} }

View File

@@ -1489,12 +1489,8 @@ BOOL LLViewerWindow::handlePaint(LLWindow *window, S32 x, S32 y, S32 width, S
//SetBKColor(hdc, RGB(255, 255, 255)); //SetBKColor(hdc, RGB(255, 255, 255));
FillRect(hdc, &wnd_rect, CreateSolidBrush(RGB(255, 255, 255))); FillRect(hdc, &wnd_rect, CreateSolidBrush(RGB(255, 255, 255)));
std::string name_str;
gAgent.getName(name_str);
std::string temp_str; std::string temp_str;
temp_str = llformat( "%s FPS %3.1f Phy FPS %2.1f Time Dil %1.3f", /* Flawfinder: ignore */ temp_str = llformat( "FPS %3.1f Phy FPS %2.1f Time Dil %1.3f", /* Flawfinder: ignore */
name_str.c_str(),
LLViewerStats::getInstance()->mFPSStat.getMeanPerSec(), LLViewerStats::getInstance()->mFPSStat.getMeanPerSec(),
LLViewerStats::getInstance()->mSimPhysicsFPS.getPrev(0), LLViewerStats::getInstance()->mSimPhysicsFPS.getPrev(0),
LLViewerStats::getInstance()->mSimTimeDilation.getPrev(0)); LLViewerStats::getInstance()->mSimTimeDilation.getPrev(0));

View File

@@ -7502,7 +7502,7 @@ BOOL LLVOAvatar::isFullyLoaded() const
{ {
static LLCachedControl<bool> const render_unloaded_avatar("RenderUnloadedAvatar", false); static LLCachedControl<bool> const render_unloaded_avatar("RenderUnloadedAvatar", false);
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2.0a) | Added: Catznip-2.2.0a // [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2)
// Changes to LLAppearanceMgr::updateAppearanceFromCOF() expect this function to actually return mFullyLoaded for gAgentAvatarp // Changes to LLAppearanceMgr::updateAppearanceFromCOF() expect this function to actually return mFullyLoaded for gAgentAvatarp
return (render_unloaded_avatar && !isSelf()) ||(mFullyLoaded); return (render_unloaded_avatar && !isSelf()) ||(mFullyLoaded);
// [/SL:KB] // [/SL:KB]
@@ -7558,7 +7558,6 @@ void LLVOAvatar::updateMeshTextures()
{ {
static S32 update_counter = 0; static S32 update_counter = 0;
mBakedTextureDebugText.clear(); mBakedTextureDebugText.clear();
if (gNoRender) return;
// if user has never specified a texture, assign the default // if user has never specified a texture, assign the default
for (U32 i=0; i < getNumTEs(); i++) for (U32 i=0; i < getNumTEs(); i++)
@@ -8319,6 +8318,7 @@ bool resolve_appearance_version(const LLAppearanceMessageContents& contents, S32
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
{ {
static S32 largestSelfCOFSeen(LLViewerInventoryCategory::VERSION_UNKNOWN);
LL_DEBUGS("Avatar") << "starts" << LL_ENDL; LL_DEBUGS("Avatar") << "starts" << LL_ENDL;
bool enable_verbose_dumps = gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"); bool enable_verbose_dumps = gSavedSettings.getBOOL("DebugAvatarAppearanceMessage");
@@ -8346,7 +8346,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
LL_WARNS() << "bad appearance version info, discarding" << LL_ENDL; LL_WARNS() << "bad appearance version info, discarding" << LL_ENDL;
return; return;
} }
llassert(appearance_version > 0);
if (appearance_version > 1) if (appearance_version > 1)
{ {
LL_WARNS() << "unsupported appearance version " << appearance_version << ", discarding appearance message" << LL_ENDL; LL_WARNS() << "unsupported appearance version " << appearance_version << ", discarding appearance message" << LL_ENDL;
@@ -8363,25 +8363,20 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
<< " last_update_request_cof_version " << last_update_request_cof_version << " last_update_request_cof_version " << last_update_request_cof_version
<< " my_cof_version " << LLAppearanceMgr::instance().getCOFVersion() << LL_ENDL; << " my_cof_version " << LLAppearanceMgr::instance().getCOFVersion() << LL_ENDL;
if (getRegion() && (getRegion()->getCentralBakeVersion()==0)) if (largestSelfCOFSeen > this_update_cof_version)
{
LL_WARNS() << avString() << "Received AvatarAppearance message for self in non-server-bake region" << LL_ENDL;
}
if( mFirstTEMessageReceived && (appearance_version == 0))
{ {
LL_WARNS("Avatar") << "Already processed appearance for COF version " <<
largestSelfCOFSeen << ", discarding appearance with COF " << this_update_cof_version << LL_ENDL;
return; return;
} }
largestSelfCOFSeen = this_update_cof_version;
} }
else else
{ {
LL_DEBUGS("Avatar") << "appearance message received" << LL_ENDL; LL_DEBUGS("Avatar") << "appearance message received" << LL_ENDL;
} }
if (gNoRender)
{
return;
}
// Check for stale update. // Check for stale update.
if (isSelf() if (isSelf()
&& (appearance_version>0) && (appearance_version>0)
@@ -8411,7 +8406,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
} }
// No backsies zone - if we get here, the message should be valid and usable, will be processed. // No backsies zone - if we get here, the message should be valid and usable, will be processed.
LL_INFOS("Avatar") << "Processing appearance message version " << this_update_cof_version << LL_ENDL;
setIsUsingServerBakes(appearance_version > 0); setIsUsingServerBakes(appearance_version > 0);
// Note: // Note:
@@ -8474,10 +8469,8 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
LLVisualParam* param = contents.mParams[i]; LLVisualParam* param = contents.mParams[i];
F32 newWeight = contents.mParamWeights[i]; F32 newWeight = contents.mParamWeights[i];
if(param->getID() == 10000) if (!mHasPhysicsParameters && param->getID() == 10000)
{
mHasPhysicsParameters = true; mHasPhysicsParameters = true;
}
if (is_first_appearance_message || (param->getWeight() != newWeight)) if (is_first_appearance_message || (param->getWeight() != newWeight))
{ {

View File

@@ -137,11 +137,6 @@ struct LocalTextureData
LLTextureEntry *mTexEntry; LLTextureEntry *mTexEntry;
}; };
// TODO - this class doesn't really do anything, could just use a base
// class responder if nothing else gets added.
// Singu Note: Okay, sure, it's a responder ignore then!
typedef LLHTTPClient::ResponderIgnore LLHoverHeightResponder;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Callback data // Callback data
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -333,7 +328,7 @@ void LLVOAvatarSelf::markDead()
{ {
BOOL success = LLVOAvatar::loadAvatar(); BOOL success = LLVOAvatar::loadAvatar();
// set all parameters sotred directly in the avatar to have // set all parameters stored directly in the avatar to have
// the isSelfParam to be TRUE - this is used to prevent // the isSelfParam to be TRUE - this is used to prevent
// them from being animated or trigger accidental rebakes // them from being animated or trigger accidental rebakes
// when we copy params from the wearable to the base avatar. // when we copy params from the wearable to the base avatar.
@@ -384,8 +379,6 @@ BOOL LLVOAvatarSelf::buildMenus()
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// build the attach and detach menus // build the attach and detach menus
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
if(gNoRender)
return TRUE;
buildContextMenus(); buildContextMenus();
init_meshes_and_morphs_menu(); init_meshes_and_morphs_menu();
@@ -758,7 +751,7 @@ void LLVOAvatarSelf::updateVisualParams()
void LLVOAvatarSelf::writeWearablesToAvatar() void LLVOAvatarSelf::writeWearablesToAvatar()
{ {
for (U32 type = 0; type < LLWearableType::WT_COUNT; type++) for (U32 type = 0; type < LLWearableType::WT_COUNT; type++)
{ {
LLWearable *wearable = gAgentWearables.getTopWearable((LLWearableType::EType)type); LLWearable *wearable = gAgentWearables.getTopWearable((LLWearableType::EType)type);
if (wearable) if (wearable)
@@ -792,6 +785,13 @@ void LLVOAvatarSelf::requestStopMotion(LLMotion* motion)
gAgent.requestStopMotion(motion); gAgent.requestStopMotion(motion);
} }
// virtual
bool LLVOAvatarSelf::hasMotionFromSource(const LLUUID& source_id)
{
AnimSourceIterator motion_it = mAnimationSources.find(source_id);
return motion_it != mAnimationSources.end();
}
// virtual // virtual
void LLVOAvatarSelf::stopMotionFromSource(const LLUUID& source_id) void LLVOAvatarSelf::stopMotionFromSource(const LLUUID& source_id)
{ {
@@ -1106,13 +1106,6 @@ void LLVOAvatarSelf::wearableUpdated( LLWearableType::EType type, BOOL upload_re
} }
} }
} }
// Physics type has no associated baked textures, but change of params needs to be sent to
// other avatars.
if (type == LLWearableType::WT_PHYSICS)
{
gAgent.sendAgentSetAppearance();
}
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -1137,26 +1130,16 @@ BOOL LLVOAvatarSelf::isWearingAttachment(const LLUUID& inv_item_id) const
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
BOOL LLVOAvatarSelf::attachmentWasRequested(const LLUUID& inv_item_id) const BOOL LLVOAvatarSelf::attachmentWasRequested(const LLUUID& inv_item_id) const
{ {
const F32 REQUEST_EXPIRATION_SECONDS = 5.0; // any request older than this is ignored/removed. constexpr F32 REQUEST_EXPIRATION_SECONDS = 5.0; // any request older than this is ignored/removed.
std::map<LLUUID,LLTimer>::iterator it = mAttachmentRequests.find(inv_item_id); auto it = mAttachmentRequests.find(inv_item_id);
if (it != mAttachmentRequests.end()) if (it != mAttachmentRequests.end())
{ {
const LLTimer& request_time = it->second; if (it->second.getElapsedTimeF32() > REQUEST_EXPIRATION_SECONDS)
F32 request_time_elapsed = request_time.getElapsedTimeF32();
if (request_time_elapsed > REQUEST_EXPIRATION_SECONDS)
{
mAttachmentRequests.erase(it); mAttachmentRequests.erase(it);
return FALSE;
}
else else
{
return TRUE; return TRUE;
}
}
else
{
return FALSE;
} }
return FALSE;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -3156,7 +3139,11 @@ void LLVOAvatarSelf::sendHoverHeight() const
update["hover_height"] = hover_offset[2]; update["hover_height"] = hover_offset[2];
LL_DEBUGS("Avatar") << avString() << "sending hover height value " << hover_offset[2] << LL_ENDL; LL_DEBUGS("Avatar") << avString() << "sending hover height value " << hover_offset[2] << LL_ENDL;
LLHTTPClient::post(url, update, new LLHoverHeightResponder);
// *TODO: - this class doesn't really do anything, could just use a base
// class responder if nothing else gets added.
// (comment from removed Responder)
LLHTTPClient::post(url, update, new LLHTTPClient::ResponderIgnore);
mLastHoverOffsetSent = hover_offset; mLastHoverOffsetSent = hover_offset;
} }
@@ -3181,10 +3168,6 @@ void LLVOAvatarSelf::setHoverOffset(const LLVector3& hover_offset, bool send_upd
//------------------------------------------------------------------------ //------------------------------------------------------------------------
BOOL LLVOAvatarSelf::needsRenderBeam() BOOL LLVOAvatarSelf::needsRenderBeam()
{ {
if (gNoRender)
{
return FALSE;
}
LLTool *tool = LLToolMgr::getInstance()->getCurrentTool(); LLTool *tool = LLToolMgr::getInstance()->getCurrentTool();
BOOL is_touching_or_grabbing = (tool == LLToolGrab::getInstance() && LLToolGrab::getInstance()->isEditing()); BOOL is_touching_or_grabbing = (tool == LLToolGrab::getInstance() && LLToolGrab::getInstance()->isEditing());

View File

@@ -96,6 +96,7 @@ public:
// LLCharacter interface and related // LLCharacter interface and related
//-------------------------------------------------------------------- //--------------------------------------------------------------------
public: public:
/*virtual*/ bool hasMotionFromSource(const LLUUID& source_id);
/*virtual*/ void stopMotionFromSource(const LLUUID& source_id); /*virtual*/ void stopMotionFromSource(const LLUUID& source_id);
/*virtual*/ void requestStopMotion(LLMotion* motion); /*virtual*/ void requestStopMotion(LLMotion* motion);
/*virtual*/ LLJoint* getJoint(const std::string &name); /*virtual*/ LLJoint* getJoint(const std::string &name);

View File

@@ -86,7 +86,7 @@ std::string rlvGetItemNameFromObjID(const LLUUID& idObj, bool fIncludeAttachPt =
return strItemName; return strItemName;
const LLViewerJointAttachment* pAttachPt = const LLViewerJointAttachment* pAttachPt =
get_if_there(gAgentAvatarp->mAttachmentPoints, RlvAttachPtLookup::getAttachPointIndex(pObjRoot), (LLViewerJointAttachment*)NULL); get_if_there(gAgentAvatarp->mAttachmentPoints, RlvAttachPtLookup::getAttachPointIndex(pObjRoot), static_cast<LLViewerJointAttachment*>(NULL));
std::string strAttachPtName = (pAttachPt) ? pAttachPt->getName() : std::string("Unknown"); std::string strAttachPtName = (pAttachPt) ? pAttachPt->getName() : std::string("Unknown");
return llformat("%s (%s%s)", strItemName.c_str(), strAttachPtName.c_str(), (pObj == pObjRoot) ? "" : ", child"); return llformat("%s (%s%s)", strItemName.c_str(), strAttachPtName.c_str(), (pObj == pObjRoot) ? "" : ", child");
} }
@@ -228,7 +228,7 @@ void RlvFloaterBehaviours::onAvatarNameLookup(const LLUUID& idAgent, const LLAva
} }
// Checked: 2011-05-26 (RLVa-1.3.1c) | Added: RLVa-1.3.1c // Checked: 2011-05-26 (RLVa-1.3.1c) | Added: RLVa-1.3.1c
void RlvFloaterBehaviours::onBtnCopyToClipboard() void RlvFloaterBehaviours::onBtnCopyToClipboard() const
{ {
std::ostringstream strRestrictions; std::ostringstream strRestrictions;
@@ -394,7 +394,7 @@ BOOL RlvFloaterLocks::postBuild()
} }
// Checked: 2010-03-11 (RLVa-1.2.0a) | Added: RLVa-1.2.0a // Checked: 2010-03-11 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
void RlvFloaterLocks::onRlvCommand(const RlvCommand& rlvCmd, ERlvCmdRet eRet) void RlvFloaterLocks::onRlvCommand(const RlvCommand& rlvCmd, ERlvCmdRet eRet) const
{ {
// Refresh on any successful @XXX=y|n command where XXX is any of the attachment or wearable locking behaviours // Refresh on any successful @XXX=y|n command where XXX is any of the attachment or wearable locking behaviours
if ( (RLV_RET_SUCCESS == eRet) && ((RLV_TYPE_ADD == rlvCmd.getParamType()) || (RLV_TYPE_REMOVE == rlvCmd.getParamType())) ) if ( (RLV_RET_SUCCESS == eRet) && ((RLV_TYPE_ADD == rlvCmd.getParamType()) || (RLV_TYPE_REMOVE == rlvCmd.getParamType())) )
@@ -415,7 +415,7 @@ void RlvFloaterLocks::onRlvCommand(const RlvCommand& rlvCmd, ERlvCmdRet eRet)
} }
// Checked: 2010-03-18 (RLVa-1.2.0) // Checked: 2010-03-18 (RLVa-1.2.0)
void RlvFloaterLocks::refreshAll() void RlvFloaterLocks::refreshAll() const
{ {
LLScrollListCtrl* pLockList = getChild<LLScrollListCtrl>("lock_list"); LLScrollListCtrl* pLockList = getChild<LLScrollListCtrl>("lock_list");
pLockList->operateOnAll(LLCtrlListInterface::OP_DELETE); pLockList->operateOnAll(LLCtrlListInterface::OP_DELETE);
@@ -460,7 +460,7 @@ void RlvFloaterLocks::refreshAll()
itAttachPt != attachPtAdd.end(); ++itAttachPt) itAttachPt != attachPtAdd.end(); ++itAttachPt)
{ {
const LLViewerJointAttachment* pAttachPt = const LLViewerJointAttachment* pAttachPt =
get_if_there(gAgentAvatarp->mAttachmentPoints, itAttachPt->first, (LLViewerJointAttachment*)NULL); get_if_there(gAgentAvatarp->mAttachmentPoints, itAttachPt->first, static_cast<LLViewerJointAttachment*>(NULL));
sdColumns[2]["value"] = pAttachPt->getName(); sdColumns[2]["value"] = pAttachPt->getName();
sdColumns[3]["value"] = rlvGetItemNameFromObjID(itAttachPt->second); sdColumns[3]["value"] = rlvGetItemNameFromObjID(itAttachPt->second);
@@ -473,7 +473,7 @@ void RlvFloaterLocks::refreshAll()
itAttachPt != attachPtRem.end(); ++itAttachPt) itAttachPt != attachPtRem.end(); ++itAttachPt)
{ {
const LLViewerJointAttachment* pAttachPt = const LLViewerJointAttachment* pAttachPt =
get_if_there(gAgentAvatarp->mAttachmentPoints, itAttachPt->first, (LLViewerJointAttachment*)NULL); get_if_there(gAgentAvatarp->mAttachmentPoints, itAttachPt->first, static_cast<LLViewerJointAttachment*>(NULL));
sdColumns[2]["value"] = pAttachPt->getName(); sdColumns[2]["value"] = pAttachPt->getName();
sdColumns[3]["value"] = rlvGetItemNameFromObjID(itAttachPt->second); sdColumns[3]["value"] = rlvGetItemNameFromObjID(itAttachPt->second);

View File

@@ -53,7 +53,7 @@ public:
*/ */
protected: protected:
void onAvatarNameLookup(const LLUUID& idAgent, const LLAvatarName& avName); void onAvatarNameLookup(const LLUUID& idAgent, const LLAvatarName& avName);
void onBtnCopyToClipboard(); void onBtnCopyToClipboard() const;
void onCommand(const RlvCommand& rlvCmd, ERlvCmdRet eRet); void onCommand(const RlvCommand& rlvCmd, ERlvCmdRet eRet);
void refreshAll(); void refreshAll();
@@ -88,8 +88,8 @@ public:
* Member functions * Member functions
*/ */
protected: protected:
void onRlvCommand(const RlvCommand& rlvCmd, ERlvCmdRet eRet); void onRlvCommand(const RlvCommand& rlvCmd, ERlvCmdRet eRet) const;
void refreshAll(); void refreshAll() const;
/* /*
* Member variables * Member variables