Buncha pointless sync and cleanup
This commit is contained in:
@@ -81,6 +81,7 @@ public:
|
||||
~LLAvatarBoneInfo()
|
||||
{
|
||||
std::for_each(mChildList.begin(), mChildList.end(), DeletePointer());
|
||||
mChildList.clear();
|
||||
}
|
||||
BOOL parseXml(LLXmlTreeNode* node);
|
||||
|
||||
@@ -108,6 +109,7 @@ public:
|
||||
~LLAvatarSkeletonInfo()
|
||||
{
|
||||
std::for_each(mBoneInfoList.begin(), mBoneInfoList.end(), DeletePointer());
|
||||
mBoneInfoList.clear();
|
||||
}
|
||||
BOOL parseXml(LLXmlTreeNode* node);
|
||||
S32 getNumBones() const { return mNumBones; }
|
||||
@@ -132,14 +134,25 @@ LLAvatarAppearance::LLAvatarXmlInfo::LLAvatarXmlInfo()
|
||||
LLAvatarAppearance::LLAvatarXmlInfo::~LLAvatarXmlInfo()
|
||||
{
|
||||
std::for_each(mMeshInfoList.begin(), mMeshInfoList.end(), DeletePointer());
|
||||
mMeshInfoList.clear();
|
||||
|
||||
std::for_each(mSkeletalDistortionInfoList.begin(), mSkeletalDistortionInfoList.end(), DeletePointer());
|
||||
mSkeletalDistortionInfoList.clear();
|
||||
|
||||
std::for_each(mAttachmentInfoList.begin(), mAttachmentInfoList.end(), DeletePointer());
|
||||
mAttachmentInfoList.clear();
|
||||
|
||||
delete_and_clear(mTexSkinColorInfo);
|
||||
delete_and_clear(mTexHairColorInfo);
|
||||
delete_and_clear(mTexEyeColorInfo);
|
||||
std::for_each(mLayerInfoList.begin(), mLayerInfoList.end(), DeletePointer());
|
||||
mLayerInfoList.clear();
|
||||
|
||||
std::for_each(mDriverInfoList.begin(), mDriverInfoList.end(), DeletePointer());
|
||||
mDriverInfoList.clear();
|
||||
|
||||
std::for_each(mMorphMaskInfoList.begin(), mMorphMaskInfoList.end(), DeletePointer());
|
||||
mMorphMaskInfoList.clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ void LLPolyMeshSharedData::freeMeshData()
|
||||
// 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);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -135,6 +135,7 @@ LLTexGlobalColorInfo::LLTexGlobalColorInfo()
|
||||
LLTexGlobalColorInfo::~LLTexGlobalColorInfo()
|
||||
{
|
||||
for_each(mParamColorInfoList.begin(), mParamColorInfoList.end(), DeletePointer());
|
||||
mParamColorInfoList.clear();
|
||||
}
|
||||
|
||||
BOOL LLTexGlobalColorInfo::parseXml(LLXmlTreeNode* node)
|
||||
|
||||
@@ -47,7 +47,6 @@ using namespace LLAvatarAppearanceDefines;
|
||||
|
||||
LLWearable* LLWearableData::getWearable(const LLWearableType::EType type, U32 index)
|
||||
{
|
||||
//llassert_always(index == 0);
|
||||
wearableentry_map_t::iterator wearable_iter = mWearableDatas.find(type);
|
||||
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)
|
||||
{
|
||||
//llassert_always(index == 0);
|
||||
LLWearable *old_wearable = getWearable(type,index);
|
||||
if (!old_wearable)
|
||||
{
|
||||
|
||||
@@ -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_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)
|
||||
addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, FALSE));
|
||||
// [/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_INVALID, new WearableEntry("invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_NONE, FALSE, FALSE));
|
||||
|
||||
@@ -912,7 +912,6 @@ P(blockingLLSDPost);
|
||||
P(blockingLLSDGet);
|
||||
P(blockingRawGet);
|
||||
P(classifiedStatsResponder);
|
||||
P(createInventoryCategoryResponder);
|
||||
P(emeraldDicDownloader);
|
||||
P(environmentApplyResponder);
|
||||
P(environmentRequestResponder);
|
||||
|
||||
@@ -290,9 +290,24 @@ bool LLAgent::isActionAllowed(const LLSD& sdname)
|
||||
|
||||
if (param == "speak")
|
||||
{
|
||||
if ( gAgent.isVoiceConnected() &&
|
||||
LLViewerParcelMgr::getInstance()->allowAgentVoice() &&
|
||||
! LLVoiceClient::getInstance()->inTuningMode() )
|
||||
bool allow_agent_voice = false;
|
||||
LLVoiceChannel* channel = LLVoiceChannel::getCurrentVoiceChannel();
|
||||
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;
|
||||
}
|
||||
@@ -405,6 +420,7 @@ LLAgent::LLAgent() :
|
||||
|
||||
mAutoPilot(FALSE),
|
||||
mAutoPilotFlyOnStop(FALSE),
|
||||
mAutoPilotAllowFlying(TRUE),
|
||||
mAutoPilotTargetGlobal(),
|
||||
mAutoPilotStopDistance(1.f),
|
||||
mAutoPilotUseRotation(FALSE),
|
||||
@@ -415,6 +431,8 @@ LLAgent::LLAgent() :
|
||||
mAutoPilotFinishedCallback(NULL),
|
||||
mAutoPilotCallbackData(NULL),
|
||||
|
||||
mMovementKeysLocked(FALSE),
|
||||
|
||||
mEffectColor(new LLColor4(0.f, 1.f, 1.f, 1.f)),
|
||||
|
||||
mHaveHomePosition(FALSE),
|
||||
@@ -425,7 +443,8 @@ LLAgent::LLAgent() :
|
||||
mCurrentFidget(0),
|
||||
mCrouch(false),
|
||||
mFirstLogin(FALSE),
|
||||
mGenderChosen(FALSE),
|
||||
mOutfitChosen(FALSE),
|
||||
|
||||
mAppearanceSerialNum(0),
|
||||
|
||||
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()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -1518,17 +1546,25 @@ void LLAgent::startAutoPilotGlobal(
|
||||
void (*finish_callback)(BOOL, void *),
|
||||
void *callback_data,
|
||||
F32 stop_distance,
|
||||
F32 rot_threshold)
|
||||
F32 rot_threshold,
|
||||
BOOL allow_flying)
|
||||
{
|
||||
if (!isAgentAvatarValid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Are there any pending callbacks from previous auto pilot requests?
|
||||
if (mAutoPilotFinishedCallback)
|
||||
{
|
||||
mAutoPilotFinishedCallback(dist_vec(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < mAutoPilotStopDistance, mAutoPilotCallbackData);
|
||||
}
|
||||
|
||||
mAutoPilotFinishedCallback = finish_callback;
|
||||
mAutoPilotCallbackData = callback_data;
|
||||
mAutoPilotRotationThreshold = rot_threshold;
|
||||
mAutoPilotBehaviorName = behavior_name;
|
||||
mAutoPilotAllowFlying = allow_flying;
|
||||
|
||||
LLVector3d delta_pos( target_global );
|
||||
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);
|
||||
}
|
||||
|
||||
if ( distance > 1.f && heightDelta > (sqrtf(mAutoPilotStopDistance) + 1.f))
|
||||
if ( distance > 1.f &&
|
||||
mAutoPilotAllowFlying &&
|
||||
heightDelta > (sqrtf(mAutoPilotStopDistance) + 1.f))
|
||||
{
|
||||
setFlying(TRUE);
|
||||
// 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()
|
||||
//-----------------------------------------------------------------------------
|
||||
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;
|
||||
if ( mLeaderID.isNull() ) return;
|
||||
|
||||
@@ -1634,7 +1677,14 @@ void LLAgent::startFollowPilot(const LLUUID &leader_id)
|
||||
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 (gAgentAvatarp->mInAir)
|
||||
if (gAgentAvatarp->mInAir && mAutoPilotAllowFlying)
|
||||
{
|
||||
setFlying(TRUE);
|
||||
}
|
||||
@@ -1761,7 +1811,7 @@ void LLAgent::autoPilot(F32 *delta_yaw)
|
||||
|
||||
*delta_yaw = yaw;
|
||||
|
||||
// Compute when to start slowing down and when to stop
|
||||
// Compute when to start slowing down
|
||||
F32 slow_distance;
|
||||
if (getFlying())
|
||||
{
|
||||
@@ -1921,7 +1971,7 @@ BOOL LLAgent::needsRenderAvatar()
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return mShowAvatar && mGenderChosen;
|
||||
return mShowAvatar && mOutfitChosen;
|
||||
}
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
void LLAgent::setAOTransition()
|
||||
{
|
||||
mAgentAccess->setTransition();
|
||||
}
|
||||
|
||||
const LLAgentAccess& LLAgent::getAgentAccess()
|
||||
{
|
||||
return *mAgentAccess;
|
||||
@@ -2853,11 +2898,7 @@ void LLAgent::handleMaturity(const LLSD &pNewValue)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
void LLAgent::buildFullname(std::string& name) const
|
||||
{
|
||||
if (isAgentAvatarValid()) name = gAgentAvatarp->getFullname();
|
||||
}
|
||||
|
||||
//*TODO remove, is not used anywhere as of August 20, 2009
|
||||
void LLAgent::buildFullnameAndTitle(std::string& name) const
|
||||
{
|
||||
if (isGroupMember())
|
||||
@@ -3261,29 +3302,6 @@ BOOL LLAgent::allowOperation(PermissionBit op,
|
||||
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()
|
||||
{
|
||||
LLColor4 effect_color = *mEffectColor;
|
||||
@@ -3318,6 +3336,13 @@ BOOL LLAgent::leftButtonGrabbed() const
|
||||
|| (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
|
||||
{
|
||||
return (mControlsTakenCount[CONTROL_YAW_POS_INDEX] > 0)
|
||||
@@ -3863,6 +3888,13 @@ BOOL LLAgent::anyControlGrabbed() 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;
|
||||
}
|
||||
@@ -4215,11 +4247,24 @@ void LLAgent::teleportCancel()
|
||||
msg->addUUIDFast(_PREHASH_SessionID, getSessionID());
|
||||
sendReliableMessage();
|
||||
}
|
||||
mTeleportCanceled = mTeleportRequest;
|
||||
}
|
||||
clearTeleportRequest();
|
||||
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)
|
||||
{
|
||||
@@ -4324,7 +4369,11 @@ void LLAgent::teleportViaLocationLookAt(const LLVector3d& pos_global)
|
||||
void LLAgent::doTeleportViaLocationLookAt(const LLVector3d& pos_global)
|
||||
{
|
||||
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);
|
||||
// <FS:CR> Aurora-sim var region teleports
|
||||
LLSimInfo* simInfo = LLWorldMap::instance().simInfoFromHandle(region_handle);
|
||||
@@ -4337,8 +4386,22 @@ void LLAgent::doTeleportViaLocationLookAt(const LLVector3d& pos_global)
|
||||
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)
|
||||
{
|
||||
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;
|
||||
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
if (mTeleportState > TELEPORT_NONE && freeze_time)
|
||||
|
||||
@@ -46,10 +46,7 @@
|
||||
#include "llinventorymodel.h"
|
||||
#include "v3dmath.h"
|
||||
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
@@ -124,6 +121,8 @@ public:
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
private:
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Login
|
||||
//--------------------------------------------------------------------
|
||||
@@ -165,8 +164,6 @@ public:
|
||||
// Name
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
void getName(std::string& name); //Legacy
|
||||
void buildFullname(std::string &name) const; //Legacy
|
||||
//*TODO remove, is not used as of August 20, 2009
|
||||
void buildFullnameAndTitle(std::string &name) const;
|
||||
|
||||
@@ -174,12 +171,13 @@ public:
|
||||
// Gender
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
// On the very first login, gender isn't chosen until the user clicks
|
||||
// in a dialog. We don't render the avatar until they choose.
|
||||
BOOL isGenderChosen() const { return mGenderChosen; }
|
||||
void setGenderChosen(BOOL b) { mGenderChosen = b; }
|
||||
// On the very first login, outfit needs to be chosen by some
|
||||
// mechanism, usually by loading the requested initial outfit. We
|
||||
// don't render the avatar until the choice is made.
|
||||
BOOL isOutfitChosen() const { return mOutfitChosen; }
|
||||
void setOutfitChosen(BOOL b) { mOutfitChosen = b; }
|
||||
private:
|
||||
BOOL mGenderChosen;
|
||||
BOOL mOutfitChosen;
|
||||
|
||||
/** Identity
|
||||
** **
|
||||
@@ -266,6 +264,9 @@ public:
|
||||
const LLHost& getRegionHost() const;
|
||||
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
|
||||
* Note that if you need to access a capability for the region, you may need to wait
|
||||
@@ -485,6 +486,7 @@ private:
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
BOOL leftButtonGrabbed() const;
|
||||
BOOL leftButtonBlocked() const;
|
||||
BOOL rotateGrabbed() const;
|
||||
BOOL forwardGrabbed() const;
|
||||
BOOL backwardGrabbed() const;
|
||||
@@ -496,13 +498,14 @@ public:
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
U32 getControlFlags();
|
||||
void setControlFlags(U32 mask); // performs bitwise mControlFlags |= mask
|
||||
void clearControlFlags(U32 mask); // performs bitwise mControlFlags &= ~mask
|
||||
void setControlFlags(U32 mask); // Performs bitwise mControlFlags |= mask
|
||||
void clearControlFlags(U32 mask); // Performs bitwise mControlFlags &= ~mask
|
||||
BOOL controlFlagsDirty() const;
|
||||
void enableControlFlagReset();
|
||||
void resetControlFlags();
|
||||
BOOL anyControlGrabbed() const; // True iff a script has taken over a control
|
||||
BOOL isControlGrabbed(S32 control_index) const;
|
||||
BOOL anyControlGrabbed() const; // True if a script has taken over any control
|
||||
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
|
||||
// released, in case of a poorly written script.
|
||||
void forceReleaseControls();
|
||||
@@ -567,6 +570,9 @@ public:
|
||||
void moveYaw(F32 mag, bool reset_view = true);
|
||||
void movePitch(F32 mag);
|
||||
|
||||
BOOL isMovementLocked() const { return mMovementKeysLocked; }
|
||||
void setMovementLocked(BOOL set_locked) { mMovementKeysLocked = set_locked; }
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Move the avatar's frame
|
||||
//--------------------------------------------------------------------
|
||||
@@ -599,8 +605,9 @@ public:
|
||||
const std::string& behavior_name = std::string(),
|
||||
const LLQuaternion *target_rotation = NULL,
|
||||
void (*finish_callback)(BOOL, void *) = NULL, void *callback_data = NULL,
|
||||
F32 stop_distance = 0.f, F32 rotation_threshold = 0.03f);
|
||||
void startFollowPilot(const LLUUID &leader_id);
|
||||
F32 stop_distance = 0.f, F32 rotation_threshold = 0.03f,
|
||||
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 setAutoPilotTargetGlobal(const LLVector3d &target_global);
|
||||
void autoPilot(F32 *delta_yaw); // Autopilot walking action, angles in radians
|
||||
@@ -608,6 +615,7 @@ public:
|
||||
private:
|
||||
BOOL mAutoPilot;
|
||||
BOOL mAutoPilotFlyOnStop;
|
||||
BOOL mAutoPilotAllowFlying;
|
||||
LLVector3d mAutoPilotTargetGlobal;
|
||||
F32 mAutoPilotStopDistance;
|
||||
BOOL mAutoPilotUseRotation;
|
||||
@@ -619,6 +627,7 @@ private:
|
||||
void (*mAutoPilotFinishedCallback)(BOOL, void *);
|
||||
void* mAutoPilotCallbackData;
|
||||
LLUUID mLeaderID;
|
||||
BOOL mMovementKeysLocked;
|
||||
|
||||
/** Movement
|
||||
** **
|
||||
@@ -662,6 +671,7 @@ public:
|
||||
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 teleportCancel(); // May or may not be allowed by server
|
||||
void restoreCanceledTeleportRequest();
|
||||
bool getTeleportKeepsLookAt() { return mbTeleportKeepsLookAt; } // Whether look-at reset after teleport
|
||||
protected:
|
||||
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;
|
||||
|
||||
LLTeleportRequestPtr mTeleportRequest;
|
||||
LLTeleportRequestPtr mTeleportCanceled;
|
||||
boost::signals2::connection mTeleportFinishedSlot;
|
||||
boost::signals2::connection mTeleportFailedSlot;
|
||||
|
||||
@@ -710,7 +721,7 @@ public:
|
||||
// Teleport State
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
ETeleportState getTeleportState() const { return mTeleportState; }
|
||||
ETeleportState getTeleportState() const;
|
||||
void setTeleportState(ETeleportState state);
|
||||
private:
|
||||
ETeleportState mTeleportState;
|
||||
@@ -752,8 +763,6 @@ public:
|
||||
const LLAgentAccess& getAgentAccess();
|
||||
BOOL canManageEstate() const;
|
||||
BOOL getAdminOverride() const;
|
||||
// ! BACKWARDS COMPATIBILITY ! This function can go away after the AO transition (see llstartup.cpp).
|
||||
void setAOTransition();
|
||||
private:
|
||||
LLAgentAccess * mAgentAccess;
|
||||
|
||||
|
||||
@@ -4905,7 +4905,7 @@ public:
|
||||
LLAppearanceMgr::getInstance()->wearInventoryCategory(category, true, false);
|
||||
|
||||
// *TODOw: This may not be necessary if initial outfit is chosen already -- josh
|
||||
gAgent.setGenderChosen(TRUE);
|
||||
gAgent.setOutfitChosen(TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -85,6 +85,9 @@
|
||||
#include "llprogressview.h"
|
||||
#include "llvocache.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 "llcrashlogger.h"
|
||||
#include "llweb.h"
|
||||
@@ -198,9 +201,6 @@
|
||||
// [RLVa:KB]
|
||||
#include "rlvhandler.h"
|
||||
// [/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.
|
||||
// The globals either represent state/config/resource-storage of either
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#include "lldir.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llagentui.h"
|
||||
#include "llui.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "llviewertexteditor.h"
|
||||
@@ -128,7 +129,7 @@ BOOL LLFloaterPostcard::postBuild()
|
||||
childDisable("from_form");
|
||||
|
||||
std::string name_string;
|
||||
gAgent.buildFullname(name_string);
|
||||
LLAgentUI::buildFullname(name_string);
|
||||
childSetValue("name_form", LLSD(name_string));
|
||||
|
||||
LLTextEditor* MsgField = getChild<LLTextEditor>("msg_form");
|
||||
|
||||
@@ -181,7 +181,7 @@ BOOL LLFloaterReporter::postBuild()
|
||||
childSetAction("cancel_btn", onClickCancel, this);
|
||||
// grab the user's name
|
||||
std::string reporter;
|
||||
gAgent.buildFullname(reporter);
|
||||
LLAgentUI::buildFullname(reporter);
|
||||
getChild<LLUICtrl>("reporter_field")->setValue(reporter);
|
||||
|
||||
center();
|
||||
|
||||
@@ -1033,6 +1033,7 @@ void LLGestureMgr::runStep(LLMultiGesture* gesture, LLGestureStep* step)
|
||||
std::string chat_text = chat_step->mChatText;
|
||||
// Don't animate the nodding, as this might not blend with
|
||||
// other playing animations.
|
||||
|
||||
const BOOL animate = FALSE;
|
||||
|
||||
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);
|
||||
S32 size = file.getSize();
|
||||
|
||||
char* buffer = new char[size+1];
|
||||
if (buffer == NULL)
|
||||
{
|
||||
LL_ERRS() << "Memory Allocation Failed" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
std::vector<char> buffer(size+1);
|
||||
|
||||
file.read((U8*)buffer, size); /* Flawfinder: ignore */
|
||||
file.read((U8*)&buffer[0], size);
|
||||
// ensure there's a trailing NULL so strlen will work.
|
||||
buffer[size] = '\0';
|
||||
|
||||
LLMultiGesture* gesture = new LLMultiGesture();
|
||||
|
||||
LLDataPackerAsciiBuffer dp(buffer, size+1);
|
||||
LLDataPackerAsciiBuffer dp(&buffer[0], size+1);
|
||||
BOOL ok = gesture->deserialize(dp);
|
||||
|
||||
if (ok)
|
||||
@@ -1182,9 +1178,6 @@ void LLGestureMgr::onLoadComplete(LLVFS *vfs,
|
||||
delete gesture;
|
||||
gesture = NULL;
|
||||
}
|
||||
|
||||
delete [] buffer;
|
||||
buffer = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1461,7 +1454,7 @@ BOOL LLGestureMgr::matchPrefix(const std::string& in_str, std::string* out_str)
|
||||
#ifdef MATCH_COMMON_CHARS
|
||||
if (!rest_of_match.empty())
|
||||
{
|
||||
*out_str = in_str + rest_of_match;
|
||||
*out_str = in_str+rest_of_match;
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "ascentkeyword.h"
|
||||
#include "llagent.h"
|
||||
#include "llagentcamera.h"
|
||||
#include "llagentui.h"
|
||||
#include "llautoreplace.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llavatarnamecache.h"
|
||||
@@ -111,7 +112,7 @@ void session_starter_helper(
|
||||
msg->addU32Fast(_PREHASH_Timestamp, NO_TIMESTAMP); // no timestamp necessary
|
||||
|
||||
std::string name;
|
||||
gAgent.buildFullname(name);
|
||||
LLAgentUI::buildFullname(name);
|
||||
|
||||
msg->addStringFast(_PREHASH_FromAgentName, name);
|
||||
msg->addStringFast(_PREHASH_Message, LLStringUtil::null);
|
||||
@@ -1114,7 +1115,7 @@ void deliver_message(const std::string& utf8_text,
|
||||
{
|
||||
std::string name;
|
||||
bool sent = false;
|
||||
gAgent.buildFullname(name);
|
||||
LLAgentUI::buildFullname(name);
|
||||
|
||||
const LLRelationship* info = LLAvatarTracker::instance().getBuddyInfo(other_participant_id);
|
||||
|
||||
@@ -1302,7 +1303,7 @@ void LLFloaterIMPanel::onSendMsg()
|
||||
(mOtherParticipantUUID.notNull()))
|
||||
{
|
||||
std::string name;
|
||||
gAgent.buildFullname(name);
|
||||
LLAgentUI::buildFullname(name);
|
||||
|
||||
// Look for actions here.
|
||||
if (action)
|
||||
@@ -1433,7 +1434,7 @@ void LLFloaterIMPanel::sendTypingState(bool typing)
|
||||
if (mSessionType != P2P_SESSION) return;
|
||||
|
||||
std::string name;
|
||||
gAgent.buildFullname(name);
|
||||
LLAgentUI::buildFullname(name);
|
||||
|
||||
pack_instant_message(
|
||||
gMessageSystem,
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llagentcamera.h"
|
||||
#include "llagentui.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llavatarnamecache.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
|
||||
std::string name;
|
||||
gAgent.buildFullname(name);
|
||||
LLAgentUI::buildFullname(name);
|
||||
pack_instant_message(gMessageSystem, gAgentID, false, gAgentSessionID, from_id,
|
||||
name, LLStringUtil::null, IM_ONLINE, IM_SESSION_LEAVE, session_id);
|
||||
gAgent.sendReliableMessage();
|
||||
|
||||
@@ -1092,6 +1092,7 @@ BOOL LLInvFVBridge::isCOFFolder() const
|
||||
return LLAppearanceMgr::instance().getIsInCOF(mUUID);
|
||||
}
|
||||
|
||||
// *TODO : Suppress isInboxFolder() once Merchant Outbox is fully deprecated
|
||||
BOOL LLInvFVBridge::isInboxFolder() const
|
||||
{
|
||||
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()
|
||||
{
|
||||
LLViewerInventoryItem* item = getItem();
|
||||
|
||||
if (item)
|
||||
{
|
||||
if (LLViewerInventoryItem* item = getItem())
|
||||
LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel());
|
||||
}
|
||||
}
|
||||
|
||||
void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
||||
|
||||
@@ -79,14 +79,13 @@
|
||||
#include "llviewerwindow.h"
|
||||
#include "llvoavatarself.h"
|
||||
#include "llwearablelist.h"
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
|
||||
#include "rlvhandler.h"
|
||||
#include "rlvlocks.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
BOOL LLInventoryState::sWearNewClothing = FALSE;
|
||||
LLUUID LLInventoryState::sWearNewClothingTransactionID;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
|
||||
* 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
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -63,9 +63,6 @@
|
||||
#include "process.h"
|
||||
#endif
|
||||
|
||||
class AIHTTPTimeoutPolicy;
|
||||
extern AIHTTPTimeoutPolicy createInventoryCategoryResponder_timeout;
|
||||
|
||||
// Increment this if the inventory contents change in a non-backwards-compatible way.
|
||||
// For viewers with link items support, former caches are incorrect.
|
||||
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"; }
|
||||
|
||||
private:
|
||||
@@ -3212,6 +3208,9 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
|
||||
InventoryCallbackInfo cbinfo = (*inv_it);
|
||||
gInventoryCallbacks.fire(cbinfo.mCallback, cbinfo.mInvID);
|
||||
}
|
||||
|
||||
//gInventory.validate();
|
||||
|
||||
// Don't show the inventory. We used to call showAgentInventory here.
|
||||
//LLPanelMainInventory* view = LLPanelMainInventory::getActiveInventory();
|
||||
//if(view)
|
||||
@@ -3634,7 +3633,8 @@ void LLInventoryModel::dumpInventory() const
|
||||
if(cat)
|
||||
{
|
||||
LL_INFOS() << " " << cat->getUUID() << " '" << cat->getName() << "' "
|
||||
<< cat->getVersion() << " " << cat->getDescendentCount() << " parent: " << cat->getParentUUID()
|
||||
<< cat->getVersion() << " " << cat->getDescendentCount()
|
||||
<< " parent: " << cat->getParentUUID()
|
||||
<< LL_ENDL;
|
||||
}
|
||||
else
|
||||
@@ -3974,7 +3974,11 @@ BOOL decompress_file(const char* src_filename, const char* dst_filename)
|
||||
const S32 DECOMPRESS_BUFFER_SIZE = 32000;
|
||||
|
||||
// open the files
|
||||
#if LL_WINDOWS
|
||||
src = gzopen_w(utf8str_to_utf16str(src_filename).c_str(), "rb");
|
||||
#else
|
||||
src = gzopen(src_filename, "rb");
|
||||
#endif
|
||||
if(!src) goto err_decompress;
|
||||
dst = LLFile::fopen(dst_filename, "wb");
|
||||
if(!dst) goto err_decompress;
|
||||
@@ -4005,13 +4009,13 @@ BOOL decompress_file(const char* src_filename, const char* dst_filename)
|
||||
#endif
|
||||
|
||||
// If we get back a normal response, handle it here
|
||||
void LLInventoryModel::FetchItemHttpHandler::httpSuccess(void)
|
||||
void LLInventoryModel::FetchItemHttpHandler::httpSuccess()
|
||||
{
|
||||
start_new_inventory_observer();
|
||||
|
||||
#if 0
|
||||
LLUUID agent_id;
|
||||
agent_id = content["agent_id"].asUUID();
|
||||
agent_id = mContent["agent_id"].asUUID();
|
||||
if (agent_id != gAgent.getID())
|
||||
{
|
||||
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()];
|
||||
}
|
||||
|
||||
if (folder_id.isNull())
|
||||
{
|
||||
folder_id = titem->getParentUUID();
|
||||
@@ -4073,7 +4078,7 @@ void LLInventoryModel::FetchItemHttpHandler::httpSuccess(void)
|
||||
gViewerWindow->getWindow()->decBusyCount();
|
||||
}
|
||||
//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 "
|
||||
<< mStatus << ": " << mReason << LL_ENDL;
|
||||
|
||||
@@ -1278,10 +1278,15 @@ void LLPanelEditWearable::saveChanges(bool force_save_as, std::string new_name)
|
||||
if (link_item)
|
||||
{
|
||||
// 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_item,
|
||||
NULL);
|
||||
|
||||
// Remove old link
|
||||
remove_inventory_item(link_item, NULL);
|
||||
}
|
||||
gAgentWearables.saveWearable(mType, index, new_name);
|
||||
|
||||
@@ -2557,17 +2557,17 @@ bool idle_startup()
|
||||
&& !sInitialOutfit.empty() // registration set up an outfit
|
||||
&& !sInitialOutfitGender.empty() // and a gender
|
||||
&& isAgentAvatarValid() // can't wear clothes without object
|
||||
&& !gAgent.isGenderChosen() ) // nothing already loading
|
||||
&& !gAgent.isOutfitChosen()) // nothing already loading
|
||||
{
|
||||
// Start loading the wearables, textures, gestures
|
||||
LLStartUp::loadInitialOutfit( sInitialOutfit, sInitialOutfitGender );
|
||||
}
|
||||
// If not first login, we need to fetch COF contents and
|
||||
// compute appearance from that.
|
||||
if (isAgentAvatarValid() && !gAgent.isFirstLogin() && !gAgent.isGenderChosen())
|
||||
if (isAgentAvatarValid() && !gAgent.isFirstLogin() && !gAgent.isOutfitChosen())
|
||||
{
|
||||
gAgentWearables.notifyLoadingStarted();
|
||||
gAgent.setGenderChosen(TRUE);
|
||||
gAgent.setOutfitChosen(TRUE);
|
||||
gAgentWearables.sendDummyAgentWearablesUpdate();
|
||||
callAfterCategoryFetch(LLAppearanceMgr::instance().getCOF(), set_flags_and_update_appearance);
|
||||
}
|
||||
@@ -2575,7 +2575,7 @@ bool idle_startup()
|
||||
display_startup();
|
||||
|
||||
// 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 );
|
||||
}
|
||||
@@ -2618,11 +2618,11 @@ bool idle_startup()
|
||||
const F32 wearables_time = wearables_timer.getElapsedTimeF32();
|
||||
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
|
||||
// know what gender we are. Pop a dialog to ask and
|
||||
// proceed to draw the world. JC
|
||||
// No point in waiting for clothing, we don't even know
|
||||
// what outfit we want. Pop up a gender chooser dialog to
|
||||
// ask and proceed to draw the world. JC
|
||||
//
|
||||
// *NOTE: We might hit this case even if we have an
|
||||
// initial outfit, but if the load hasn't started
|
||||
@@ -2650,7 +2650,7 @@ bool idle_startup()
|
||||
if (isAgentAvatarValid()
|
||||
&& gAgentAvatarp->isFullyLoaded())
|
||||
{
|
||||
//LL_INFOS() << "avatar fully loaded" << LL_ENDL;
|
||||
LL_DEBUGS("Avatar") << "avatar fully loaded" << LL_ENDL;
|
||||
LLStartUp::setStartupState( STATE_CLEANUP );
|
||||
return TRUE;
|
||||
}
|
||||
@@ -2661,7 +2661,7 @@ bool idle_startup()
|
||||
if ( gAgentWearables.areWearablesLoaded() )
|
||||
{
|
||||
// We have our clothing, proceed.
|
||||
//LL_INFOS() << "wearables loaded" << LL_ENDL;
|
||||
LL_DEBUGS("Avatar") << "wearables loaded" << LL_ENDL;
|
||||
LLStartUp::setStartupState( STATE_CLEANUP );
|
||||
return TRUE;
|
||||
}
|
||||
@@ -2700,7 +2700,7 @@ bool idle_startup()
|
||||
gViewerWindow->getWindow()->resetBusyCount();
|
||||
gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW);
|
||||
LL_DEBUGS("AppInit") << "Done releasing bitmap" << LL_ENDL;
|
||||
|
||||
//gViewerWindow->revealIntroPanel();
|
||||
gViewerWindow->setStartupComplete();
|
||||
gViewerWindow->setProgressCancelButtonVisible(FALSE);
|
||||
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;
|
||||
}
|
||||
|
||||
// This is really misnamed -- it means we have started loading
|
||||
// an outfit/shape that will give the avatar a gender eventually. JC
|
||||
gAgent.setGenderChosen(TRUE);
|
||||
gAgent.setOutfitChosen(TRUE);
|
||||
gAgentWearables.sendDummyAgentWearablesUpdate();
|
||||
}
|
||||
|
||||
//static
|
||||
@@ -3321,10 +3320,10 @@ void LLStartUp::saveInitialOutfit()
|
||||
|
||||
if (sWearablesLoadedCon.connected())
|
||||
{
|
||||
LL_DEBUGS() << "sWearablesLoadedCon is connected, disconnecting" << LL_ENDL;
|
||||
LL_DEBUGS("Avatar") << "sWearablesLoadedCon is connected, disconnecting" << LL_ENDL;
|
||||
sWearablesLoadedCon.disconnect();
|
||||
}
|
||||
LL_DEBUGS() << "calling makeNewOutfitLinks( \"" << sInitialOutfit << "\" )" << LL_ENDL;
|
||||
LL_DEBUGS("Avatar") << "calling makeNewOutfitLinks( \"" << sInitialOutfit << "\" )" << LL_ENDL;
|
||||
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);
|
||||
}
|
||||
// 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();
|
||||
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
|
||||
// outfit is chosen on COF contents, initial outfit
|
||||
// requested and available, etc.
|
||||
|
||||
//gAgent.setGenderChosen(TRUE);
|
||||
}
|
||||
|
||||
|
||||
@@ -1489,12 +1489,8 @@ BOOL LLViewerWindow::handlePaint(LLWindow *window, S32 x, S32 y, S32 width, S
|
||||
//SetBKColor(hdc, 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;
|
||||
temp_str = llformat( "%s FPS %3.1f Phy FPS %2.1f Time Dil %1.3f", /* Flawfinder: ignore */
|
||||
name_str.c_str(),
|
||||
temp_str = llformat( "FPS %3.1f Phy FPS %2.1f Time Dil %1.3f", /* Flawfinder: ignore */
|
||||
LLViewerStats::getInstance()->mFPSStat.getMeanPerSec(),
|
||||
LLViewerStats::getInstance()->mSimPhysicsFPS.getPrev(0),
|
||||
LLViewerStats::getInstance()->mSimTimeDilation.getPrev(0));
|
||||
|
||||
@@ -7502,7 +7502,7 @@ BOOL LLVOAvatar::isFullyLoaded() const
|
||||
{
|
||||
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
|
||||
return (render_unloaded_avatar && !isSelf()) ||(mFullyLoaded);
|
||||
// [/SL:KB]
|
||||
@@ -7558,7 +7558,6 @@ void LLVOAvatar::updateMeshTextures()
|
||||
{
|
||||
static S32 update_counter = 0;
|
||||
mBakedTextureDebugText.clear();
|
||||
if (gNoRender) return;
|
||||
|
||||
// if user has never specified a texture, assign the default
|
||||
for (U32 i=0; i < getNumTEs(); i++)
|
||||
@@ -8319,6 +8318,7 @@ bool resolve_appearance_version(const LLAppearanceMessageContents& contents, S32
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
|
||||
{
|
||||
static S32 largestSelfCOFSeen(LLViewerInventoryCategory::VERSION_UNKNOWN);
|
||||
LL_DEBUGS("Avatar") << "starts" << LL_ENDL;
|
||||
|
||||
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;
|
||||
return;
|
||||
}
|
||||
|
||||
llassert(appearance_version > 0);
|
||||
if (appearance_version > 1)
|
||||
{
|
||||
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
|
||||
<< " my_cof_version " << LLAppearanceMgr::instance().getCOFVersion() << LL_ENDL;
|
||||
|
||||
if (getRegion() && (getRegion()->getCentralBakeVersion()==0))
|
||||
{
|
||||
LL_WARNS() << avString() << "Received AvatarAppearance message for self in non-server-bake region" << LL_ENDL;
|
||||
}
|
||||
if( mFirstTEMessageReceived && (appearance_version == 0))
|
||||
if (largestSelfCOFSeen > this_update_cof_version)
|
||||
{
|
||||
LL_WARNS("Avatar") << "Already processed appearance for COF version " <<
|
||||
largestSelfCOFSeen << ", discarding appearance with COF " << this_update_cof_version << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
largestSelfCOFSeen = this_update_cof_version;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_DEBUGS("Avatar") << "appearance message received" << LL_ENDL;
|
||||
}
|
||||
|
||||
if (gNoRender)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Check for stale update.
|
||||
if (isSelf()
|
||||
&& (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.
|
||||
|
||||
LL_INFOS("Avatar") << "Processing appearance message version " << this_update_cof_version << LL_ENDL;
|
||||
setIsUsingServerBakes(appearance_version > 0);
|
||||
|
||||
// Note:
|
||||
@@ -8474,10 +8469,8 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
|
||||
LLVisualParam* param = contents.mParams[i];
|
||||
F32 newWeight = contents.mParamWeights[i];
|
||||
|
||||
if(param->getID() == 10000)
|
||||
{
|
||||
if (!mHasPhysicsParameters && param->getID() == 10000)
|
||||
mHasPhysicsParameters = true;
|
||||
}
|
||||
|
||||
if (is_first_appearance_message || (param->getWeight() != newWeight))
|
||||
{
|
||||
|
||||
@@ -137,11 +137,6 @@ struct LocalTextureData
|
||||
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
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -333,7 +328,7 @@ void LLVOAvatarSelf::markDead()
|
||||
{
|
||||
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
|
||||
// them from being animated or trigger accidental rebakes
|
||||
// when we copy params from the wearable to the base avatar.
|
||||
@@ -384,8 +379,6 @@ BOOL LLVOAvatarSelf::buildMenus()
|
||||
//-------------------------------------------------------------------------
|
||||
// build the attach and detach menus
|
||||
//-------------------------------------------------------------------------
|
||||
if(gNoRender)
|
||||
return TRUE;
|
||||
buildContextMenus();
|
||||
|
||||
init_meshes_and_morphs_menu();
|
||||
@@ -758,7 +751,7 @@ void LLVOAvatarSelf::updateVisualParams()
|
||||
|
||||
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);
|
||||
if (wearable)
|
||||
@@ -792,6 +785,13 @@ void LLVOAvatarSelf::requestStopMotion(LLMotion* 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
|
||||
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
|
||||
{
|
||||
const 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);
|
||||
constexpr F32 REQUEST_EXPIRATION_SECONDS = 5.0; // any request older than this is ignored/removed.
|
||||
auto it = mAttachmentRequests.find(inv_item_id);
|
||||
if (it != mAttachmentRequests.end())
|
||||
{
|
||||
const LLTimer& request_time = it->second;
|
||||
F32 request_time_elapsed = request_time.getElapsedTimeF32();
|
||||
if (request_time_elapsed > REQUEST_EXPIRATION_SECONDS)
|
||||
{
|
||||
if (it->second.getElapsedTimeF32() > REQUEST_EXPIRATION_SECONDS)
|
||||
mAttachmentRequests.erase(it);
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -3156,7 +3139,11 @@ void LLVOAvatarSelf::sendHoverHeight() const
|
||||
update["hover_height"] = hover_offset[2];
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -3181,10 +3168,6 @@ void LLVOAvatarSelf::setHoverOffset(const LLVector3& hover_offset, bool send_upd
|
||||
//------------------------------------------------------------------------
|
||||
BOOL LLVOAvatarSelf::needsRenderBeam()
|
||||
{
|
||||
if (gNoRender)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
LLTool *tool = LLToolMgr::getInstance()->getCurrentTool();
|
||||
|
||||
BOOL is_touching_or_grabbing = (tool == LLToolGrab::getInstance() && LLToolGrab::getInstance()->isEditing());
|
||||
|
||||
@@ -96,6 +96,7 @@ public:
|
||||
// LLCharacter interface and related
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
/*virtual*/ bool hasMotionFromSource(const LLUUID& source_id);
|
||||
/*virtual*/ void stopMotionFromSource(const LLUUID& source_id);
|
||||
/*virtual*/ void requestStopMotion(LLMotion* motion);
|
||||
/*virtual*/ LLJoint* getJoint(const std::string &name);
|
||||
|
||||
@@ -86,7 +86,7 @@ std::string rlvGetItemNameFromObjID(const LLUUID& idObj, bool fIncludeAttachPt =
|
||||
return strItemName;
|
||||
|
||||
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");
|
||||
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
|
||||
void RlvFloaterBehaviours::onBtnCopyToClipboard()
|
||||
void RlvFloaterBehaviours::onBtnCopyToClipboard() const
|
||||
{
|
||||
std::ostringstream strRestrictions;
|
||||
|
||||
@@ -394,7 +394,7 @@ BOOL RlvFloaterLocks::postBuild()
|
||||
}
|
||||
|
||||
// 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
|
||||
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)
|
||||
void RlvFloaterLocks::refreshAll()
|
||||
void RlvFloaterLocks::refreshAll() const
|
||||
{
|
||||
LLScrollListCtrl* pLockList = getChild<LLScrollListCtrl>("lock_list");
|
||||
pLockList->operateOnAll(LLCtrlListInterface::OP_DELETE);
|
||||
@@ -460,7 +460,7 @@ void RlvFloaterLocks::refreshAll()
|
||||
itAttachPt != attachPtAdd.end(); ++itAttachPt)
|
||||
{
|
||||
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[3]["value"] = rlvGetItemNameFromObjID(itAttachPt->second);
|
||||
|
||||
@@ -473,7 +473,7 @@ void RlvFloaterLocks::refreshAll()
|
||||
itAttachPt != attachPtRem.end(); ++itAttachPt)
|
||||
{
|
||||
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[3]["value"] = rlvGetItemNameFromObjID(itAttachPt->second);
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
*/
|
||||
protected:
|
||||
void onAvatarNameLookup(const LLUUID& idAgent, const LLAvatarName& avName);
|
||||
void onBtnCopyToClipboard();
|
||||
void onBtnCopyToClipboard() const;
|
||||
void onCommand(const RlvCommand& rlvCmd, ERlvCmdRet eRet);
|
||||
void refreshAll();
|
||||
|
||||
@@ -88,8 +88,8 @@ public:
|
||||
* Member functions
|
||||
*/
|
||||
protected:
|
||||
void onRlvCommand(const RlvCommand& rlvCmd, ERlvCmdRet eRet);
|
||||
void refreshAll();
|
||||
void onRlvCommand(const RlvCommand& rlvCmd, ERlvCmdRet eRet) const;
|
||||
void refreshAll() const;
|
||||
|
||||
/*
|
||||
* Member variables
|
||||
|
||||
Reference in New Issue
Block a user