commit
3e23c04c9b
|
|
@ -235,7 +235,7 @@ public:
|
|||
// Child process handling (Unix only for now)
|
||||
//
|
||||
// Set a callback to be run on exit of a child process
|
||||
// WARNING! This callback is run from the signal handler due to the extreme crappiness of
|
||||
// WARNING! This callback is run from the signal handler due to
|
||||
// Linux threading requiring waitpid() to be called from the thread that spawned the process.
|
||||
// At some point I will make this more behaved, but I'm not going to fix this right now - djs
|
||||
void setChildCallback(pid_t pid, LLAppChildCallback callback);
|
||||
|
|
|
|||
|
|
@ -133,6 +133,7 @@ public:
|
|||
U8 mData[UUID_BYTES];
|
||||
};
|
||||
|
||||
typedef std::vector<LLUUID> uuid_vec_t;
|
||||
|
||||
// Construct
|
||||
inline LLUUID::LLUUID()
|
||||
|
|
|
|||
|
|
@ -452,7 +452,7 @@ BOOL LLParcel::allowTerraformBy(const LLUUID &agent_id) const
|
|||
|
||||
bool LLParcel::isAgentBlockedFromParcel(LLParcel* parcelp,
|
||||
const LLUUID& agent_id,
|
||||
const std::vector<LLUUID>& group_ids,
|
||||
const uuid_vec_t& group_ids,
|
||||
const BOOL is_agent_identified,
|
||||
const BOOL is_agent_transacted,
|
||||
const BOOL is_agent_ageverified)
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ public:
|
|||
void setMediaURLResetTimer(F32 time);
|
||||
virtual void setLocalID(S32 local_id);
|
||||
|
||||
// blow away all the extra crap lurking in parcels, including urls, access lists, etc
|
||||
// blow away all the extra stuff lurking in parcels, including urls, access lists, etc
|
||||
void clearParcel();
|
||||
|
||||
// This value is not persisted out to the parcel file, it is only
|
||||
|
|
@ -538,7 +538,7 @@ public:
|
|||
|
||||
static bool isAgentBlockedFromParcel(LLParcel* parcelp,
|
||||
const LLUUID& agent_id,
|
||||
const std::vector<LLUUID>& group_ids,
|
||||
const uuid_vec_t& group_ids,
|
||||
const BOOL is_agent_identified,
|
||||
const BOOL is_agent_transacted,
|
||||
const BOOL is_agent_ageverified);
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ LLTSCode LLTransferSourceAsset::dataCallback(const S32 packet_id,
|
|||
*data_handle = tmpp;
|
||||
if (!vf.read(tmpp, max_bytes)) /* Flawfinder: Ignore */
|
||||
{
|
||||
// Crap, read failure, need to deal with it.
|
||||
// Read failure, need to deal with it.
|
||||
delete[] tmpp;
|
||||
*data_handle = NULL;
|
||||
returned_bytes = 0;
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ LLUUID LLFlatListView::getSelectedUUID() const
|
|||
}
|
||||
}
|
||||
|
||||
void LLFlatListView::getSelectedUUIDs(std::vector<LLUUID>& selected_uuids) const
|
||||
void LLFlatListView::getSelectedUUIDs(uuid_vec_t& selected_uuids) const
|
||||
{
|
||||
if (mSelectedItemPairs.empty()) return;
|
||||
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ public:
|
|||
* Get LLUUIDs associated with selected items
|
||||
* @param selected_uuids An std::vector being populated with LLUUIDs associated with selected items
|
||||
*/
|
||||
virtual void getSelectedUUIDs(std::vector<LLUUID>& selected_uuids) const;
|
||||
virtual void getSelectedUUIDs(uuid_vec_t& selected_uuids) const;
|
||||
|
||||
/** Get the top selected item */
|
||||
virtual LLPanel* getSelectedItem() const;
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ private:
|
|||
// class, by allowing another method to be specified which determines
|
||||
// if the menu item should consider itself checked as true or not. Be
|
||||
// careful that the provided callback is fast - it needs to be VERY
|
||||
// FUCKING EFFICIENT, because it may need to be checked a lot.
|
||||
// EFFICIENT because it may need to be checked a lot.
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
class LLMenuItemCheckGL
|
||||
|
|
|
|||
|
|
@ -957,14 +957,14 @@ void LLScrollListCtrl::mouseOverHighlightNthItem(S32 target_index)
|
|||
}
|
||||
}
|
||||
|
||||
S32 LLScrollListCtrl::selectMultiple( std::vector<LLUUID> ids )
|
||||
S32 LLScrollListCtrl::selectMultiple( uuid_vec_t ids )
|
||||
{
|
||||
item_list::iterator iter;
|
||||
S32 count = 0;
|
||||
for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
|
||||
{
|
||||
LLScrollListItem* item = *iter;
|
||||
std::vector<LLUUID>::iterator iditr;
|
||||
uuid_vec_t::iterator iditr;
|
||||
for(iditr = ids.begin(); iditr != ids.end(); ++iditr)
|
||||
{
|
||||
if (item->getEnabled() && (item->getUUID() == (*iditr)))
|
||||
|
|
|
|||
|
|
@ -379,7 +379,7 @@ public:
|
|||
BOOL getSortAscending() { return mSortColumns.empty() ? TRUE : mSortColumns.back().second; }
|
||||
BOOL hasSortOrder() const;
|
||||
|
||||
S32 selectMultiple( std::vector<LLUUID> ids );
|
||||
S32 selectMultiple( uuid_vec_t ids );
|
||||
// conceptually const, but mutates mItemList
|
||||
void updateSort() const;
|
||||
// sorts a list without affecting the permanent sort order (so further list insertions can be unsorted, for example)
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ public:
|
|||
virtual void setLanguageTextInput( const LLCoordGL & pos ) {};
|
||||
virtual void updateLanguageTextInputArea() {}
|
||||
virtual void interruptLanguageTextInput() {}
|
||||
virtual void spawnWebBrowser(const std::string& escaped_url) {};
|
||||
virtual void spawnWebBrowser(const std::string& escaped_url, bool async) {};
|
||||
|
||||
static std::vector<std::string> getDynamicFallbackFontList();
|
||||
|
||||
|
|
|
|||
|
|
@ -3178,7 +3178,7 @@ S32 OSMessageBoxMacOSX(const std::string& text, const std::string& caption, U32
|
|||
|
||||
// Open a URL with the user's default web browser.
|
||||
// Must begin with protocol identifier.
|
||||
void LLWindowMacOSX::spawnWebBrowser(const std::string& escaped_url)
|
||||
void LLWindowMacOSX::spawnWebBrowser(const std::string& escaped_url, bool async)
|
||||
{
|
||||
bool found = false;
|
||||
S32 i;
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ public:
|
|||
|
||||
/*virtual*/ void allowLanguageTextInput(LLPreeditor *preeditor, BOOL b);
|
||||
/*virtual*/ void interruptLanguageTextInput();
|
||||
/*virtual*/ void spawnWebBrowser(const std::string& escaped_url);
|
||||
/*virtual*/ void spawnWebBrowser(const std::string& escaped_url, bool async);
|
||||
|
||||
static std::vector<std::string> getDynamicFallbackFontList();
|
||||
|
||||
|
|
|
|||
|
|
@ -2465,7 +2465,7 @@ void exec_cmd(const std::string& cmd, const std::string& arg)
|
|||
|
||||
// Open a URL with the user's default web browser.
|
||||
// Must begin with protocol identifier.
|
||||
void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url)
|
||||
void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url, bool async)
|
||||
{
|
||||
llinfos << "spawn_web_browser: " << escaped_url << llendl;
|
||||
|
||||
|
|
@ -2543,6 +2543,7 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
|
|||
// Use libfontconfig to find us a nice ordered list of fallback fonts
|
||||
// specific to this system.
|
||||
std::string final_fallback("/usr/share/fonts/truetype/kochi/kochi-gothic.ttf");
|
||||
const int max_font_count_cutoff = 40; // fonts are expensive in the current system, don't enumerate an arbitrary number of them
|
||||
// Our 'ideal' font properties which define the sorting results.
|
||||
// slant=0 means Roman, index=0 means the first face in a font file
|
||||
// (the one we actually use), weight=80 means medium weight,
|
||||
|
|
@ -2558,7 +2559,6 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
|
|||
std::vector<std::string> rtns;
|
||||
FcFontSet *fs = NULL;
|
||||
FcPattern *sortpat = NULL;
|
||||
int font_count = 0;
|
||||
|
||||
llinfos << "Getting system font list from FontConfig..." << llendl;
|
||||
|
||||
|
|
@ -2602,12 +2602,13 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
|
|||
FcPatternDestroy(sortpat);
|
||||
}
|
||||
|
||||
int found_font_count = 0;
|
||||
if (fs)
|
||||
{
|
||||
// Get the full pathnames to the fonts, where available,
|
||||
// which is what we really want.
|
||||
int i;
|
||||
for (i=0; i<fs->nfont; ++i)
|
||||
found_font_count = fs->nfont;
|
||||
for (int i=0; i<fs->nfont; ++i)
|
||||
{
|
||||
FcChar8 *filename;
|
||||
if (FcResultMatch == FcPatternGetString(fs->fonts[i],
|
||||
|
|
@ -2616,7 +2617,8 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
|
|||
&& filename)
|
||||
{
|
||||
rtns.push_back(std::string((const char*)filename));
|
||||
++font_count;
|
||||
if (rtns.size() >= max_font_count_cutoff)
|
||||
break; // hit limit
|
||||
}
|
||||
}
|
||||
FcFontSetDestroy (fs);
|
||||
|
|
@ -2629,7 +2631,7 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
|
|||
{
|
||||
lldebugs << " file: " << *it << llendl;
|
||||
}
|
||||
llinfos << "Using " << font_count << " system font(s)." << llendl;
|
||||
llinfos << "Using " << rtns.size() << "/" << found_font_count << " system fonts." << llendl;
|
||||
|
||||
rtns.push_back(final_fallback);
|
||||
return rtns;
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ public:
|
|||
/*virtual*/ void *getPlatformWindow();
|
||||
/*virtual*/ void bringToFront();
|
||||
|
||||
/*virtual*/ void spawnWebBrowser(const std::string& escaped_url);
|
||||
/*virtual*/ void spawnWebBrowser(const std::string& escaped_url, bool async);
|
||||
|
||||
static std::vector<std::string> getDynamicFallbackFontList();
|
||||
|
||||
|
|
|
|||
|
|
@ -2959,7 +2959,7 @@ S32 OSMessageBoxWin32(const std::string& text, const std::string& caption, U32 t
|
|||
}
|
||||
|
||||
|
||||
void LLWindowWin32::spawnWebBrowser(const std::string& escaped_url )
|
||||
void LLWindowWin32::spawnWebBrowser(const std::string& escaped_url, bool async)
|
||||
{
|
||||
bool found = false;
|
||||
S32 i;
|
||||
|
|
@ -2989,7 +2989,12 @@ void LLWindowWin32::spawnWebBrowser(const std::string& escaped_url )
|
|||
|
||||
// let the OS decide what to use to open the URL
|
||||
SHELLEXECUTEINFO sei = { sizeof( sei ) };
|
||||
sei.fMask = SEE_MASK_FLAG_DDEWAIT;
|
||||
// NOTE: this assumes that SL will stick around long enough to complete the DDE message exchange
|
||||
// necessary for ShellExecuteEx to complete
|
||||
if (async)
|
||||
{
|
||||
sei.fMask = SEE_MASK_ASYNCOK;
|
||||
}
|
||||
sei.nShow = SW_SHOWNORMAL;
|
||||
sei.lpVerb = L"open";
|
||||
sei.lpFile = url_utf16.c_str();
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ public:
|
|||
/*virtual*/ void setLanguageTextInput( const LLCoordGL & pos );
|
||||
/*virtual*/ void updateLanguageTextInputArea();
|
||||
/*virtual*/ void interruptLanguageTextInput();
|
||||
/*virtual*/ void spawnWebBrowser(const std::string& escaped_url);
|
||||
/*virtual*/ void spawnWebBrowser(const std::string& escaped_url, bool async);
|
||||
|
||||
LLWindowCallbacks::DragNDropResult completeDragNDropRequest( const LLCoordGL gl_coord, const MASK mask, LLWindowCallbacks::DragNDropAction action, const std::string url );
|
||||
|
||||
|
|
|
|||
|
|
@ -520,7 +520,7 @@ void LLScriptExecuteLSL2::callNextQueuedEventHandler(U64 event_register, const L
|
|||
}
|
||||
else
|
||||
{
|
||||
llwarns << "Shit, somehow got an event that we're not registered for!" << llendl;
|
||||
llwarns << "Somehow got an event that we're not registered for!" << llendl;
|
||||
}
|
||||
delete eventdata;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ private:
|
|||
|
||||
std::string mProfileDir;
|
||||
std::string mHostLanguage;
|
||||
std::string mUserAgent;
|
||||
bool mCookiesEnabled;
|
||||
bool mJavascriptEnabled;
|
||||
bool mPluginsEnabled;
|
||||
|
|
@ -300,7 +301,7 @@ private:
|
|||
LLQtWebKit::getInstance()->addObserver( mBrowserWindowId, this );
|
||||
|
||||
// append details to agent string
|
||||
LLQtWebKit::getInstance()->setBrowserAgentId( "LLPluginMedia Web Browser" );
|
||||
LLQtWebKit::getInstance()->setBrowserAgentId( mUserAgent );
|
||||
|
||||
#if !LL_QTWEBKIT_USES_PIXMAPS
|
||||
// don't flip bitmap
|
||||
|
|
@ -688,6 +689,7 @@ MediaPluginWebKit::MediaPluginWebKit(LLPluginInstance::sendMessageFunction host_
|
|||
mHostLanguage = "en"; // default to english
|
||||
mJavascriptEnabled = true; // default to on
|
||||
mPluginsEnabled = true; // default to on
|
||||
mUserAgent = "LLPluginMedia Web Browser";
|
||||
}
|
||||
|
||||
MediaPluginWebKit::~MediaPluginWebKit()
|
||||
|
|
@ -1103,8 +1105,8 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
|
|||
}
|
||||
else if(message_name == "set_user_agent")
|
||||
{
|
||||
std::string user_agent = message_in.getValue("user_agent");
|
||||
LLQtWebKit::getInstance()->setBrowserAgentId( user_agent );
|
||||
mUserAgent = message_in.getValue("user_agent");
|
||||
LLQtWebKit::getInstance()->setBrowserAgentId( mUserAgent );
|
||||
}
|
||||
else if(message_name == "init_history")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10369,7 +10369,7 @@
|
|||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>VivoxDebugLevel</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -159,11 +159,11 @@ bool handleSlowMotionAnimation(const LLSD& newvalue)
|
|||
{
|
||||
if (newvalue.asBoolean())
|
||||
{
|
||||
gAgent.getAvatarObject()->setAnimTimeFactor(0.2f);
|
||||
gAgentAvatarp->setAnimTimeFactor(0.2f);
|
||||
}
|
||||
else
|
||||
{
|
||||
gAgent.getAvatarObject()->setAnimTimeFactor(1.0f);
|
||||
gAgentAvatarp->setAnimTimeFactor(1.0f);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -207,8 +207,6 @@ LLAgent::LLAgent() :
|
|||
mDistanceTraveled(0.F),
|
||||
mLastPositionGlobal(LLVector3d::zero),
|
||||
|
||||
mAvatarObject(NULL),
|
||||
|
||||
mRenderState(0),
|
||||
mTypingTimer(),
|
||||
|
||||
|
|
@ -294,7 +292,6 @@ void LLAgent::init()
|
|||
//-----------------------------------------------------------------------------
|
||||
void LLAgent::cleanup()
|
||||
{
|
||||
mAvatarObject = NULL;
|
||||
mRegionp = NULL;
|
||||
}
|
||||
|
||||
|
|
@ -315,7 +312,7 @@ LLAgent::~LLAgent()
|
|||
//-----------------------------------------------------------------------------
|
||||
void LLAgent::onAppFocusGained()
|
||||
{
|
||||
if (CAMERA_MODE_MOUSELOOK == gAgentCamera.mCameraMode)
|
||||
if (CAMERA_MODE_MOUSELOOK == gAgentCamera.getCameraMode())
|
||||
{
|
||||
gAgentCamera.changeCameraToDefault();
|
||||
LLToolMgr::getInstance()->clearSavedTool();
|
||||
|
|
@ -325,12 +322,12 @@ void LLAgent::onAppFocusGained()
|
|||
|
||||
void LLAgent::ageChat()
|
||||
{
|
||||
if (mAvatarObject.notNull())
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
// get amount of time since I last chatted
|
||||
F64 elapsed_time = (F64)mAvatarObject->mChatTimer.getElapsedTimeF32();
|
||||
F64 elapsed_time = (F64)gAgentAvatarp->mChatTimer.getElapsedTimeF32();
|
||||
// add in frame time * 3 (so it ages 4x)
|
||||
mAvatarObject->mChatTimer.setAge(elapsed_time + (F64)gFrameDTClamped * (CHAT_AGE_FAST_RATE - 1.0));
|
||||
gAgentAvatarp->mChatTimer.setAge(elapsed_time + (F64)gFrameDTClamped * (CHAT_AGE_FAST_RATE - 1.0));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -517,20 +514,20 @@ BOOL LLAgent::getFlying() const
|
|||
//-----------------------------------------------------------------------------
|
||||
void LLAgent::setFlying(BOOL fly)
|
||||
{
|
||||
if (mAvatarObject.notNull())
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
// *HACK: Don't allow to start the flying mode if we got ANIM_AGENT_STANDUP signal
|
||||
// because in this case we won't get a signal to start avatar flying animation and
|
||||
// it will be walking with flying mode "ON" indication. However we allow to switch
|
||||
// the flying mode off if we get ANIM_AGENT_STANDUP signal. See process_avatar_animation().
|
||||
// See EXT-2781.
|
||||
if(fly && mAvatarObject->mSignaledAnimations.find(ANIM_AGENT_STANDUP) != mAvatarObject->mSignaledAnimations.end())
|
||||
if(fly && gAgentAvatarp->mSignaledAnimations.find(ANIM_AGENT_STANDUP) != gAgentAvatarp->mSignaledAnimations.end())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// don't allow taking off while sitting
|
||||
if (fly && mAvatarObject->isSitting())
|
||||
if (fly && gAgentAvatarp->isSitting())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -583,9 +580,9 @@ void LLAgent::toggleFlying()
|
|||
bool LLAgent::enableFlying()
|
||||
{
|
||||
BOOL sitting = FALSE;
|
||||
if (gAgent.getAvatarObject())
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
sitting = gAgent.getAvatarObject()->isSitting();
|
||||
sitting = gAgentAvatarp->isSitting();
|
||||
}
|
||||
return !sitting;
|
||||
}
|
||||
|
|
@ -755,9 +752,9 @@ void LLAgent::sendReliableMessage()
|
|||
//-----------------------------------------------------------------------------
|
||||
LLVector3 LLAgent::getVelocity() const
|
||||
{
|
||||
if (mAvatarObject.notNull())
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
return mAvatarObject->getVelocity();
|
||||
return gAgentAvatarp->getVelocity();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -776,13 +773,13 @@ void LLAgent::setPositionAgent(const LLVector3 &pos_agent)
|
|||
llerrs << "setPositionAgent is not a number" << llendl;
|
||||
}
|
||||
|
||||
if (mAvatarObject.notNull() && mAvatarObject->getParent())
|
||||
if (isAgentAvatarValid() && gAgentAvatarp->getParent())
|
||||
{
|
||||
LLVector3 pos_agent_sitting;
|
||||
LLVector3d pos_agent_d;
|
||||
LLViewerObject *parent = (LLViewerObject*)mAvatarObject->getParent();
|
||||
LLViewerObject *parent = (LLViewerObject*)gAgentAvatarp->getParent();
|
||||
|
||||
pos_agent_sitting = mAvatarObject->getPosition() * parent->getRotation() + parent->getPositionAgent();
|
||||
pos_agent_sitting = gAgentAvatarp->getPosition() * parent->getRotation() + parent->getPositionAgent();
|
||||
pos_agent_d.setVec(pos_agent_sitting);
|
||||
|
||||
mFrameAgent.setOrigin(pos_agent_sitting);
|
||||
|
|
@ -803,9 +800,9 @@ void LLAgent::setPositionAgent(const LLVector3 &pos_agent)
|
|||
//-----------------------------------------------------------------------------
|
||||
const LLVector3d &LLAgent::getPositionGlobal() const
|
||||
{
|
||||
if (mAvatarObject.notNull() && !mAvatarObject->mDrawable.isNull())
|
||||
if (isAgentAvatarValid() && !gAgentAvatarp->mDrawable.isNull())
|
||||
{
|
||||
mPositionGlobal = getPosGlobalFromAgent(mAvatarObject->getRenderPosition());
|
||||
mPositionGlobal = getPosGlobalFromAgent(gAgentAvatarp->getRenderPosition());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -820,9 +817,9 @@ const LLVector3d &LLAgent::getPositionGlobal() const
|
|||
//-----------------------------------------------------------------------------
|
||||
const LLVector3 &LLAgent::getPositionAgent()
|
||||
{
|
||||
if(mAvatarObject.notNull() && !mAvatarObject->mDrawable.isNull())
|
||||
if (isAgentAvatarValid() && !gAgentAvatarp->mDrawable.isNull())
|
||||
{
|
||||
mFrameAgent.setOrigin(mAvatarObject->getRenderPosition());
|
||||
mFrameAgent.setOrigin(gAgentAvatarp->getRenderPosition());
|
||||
}
|
||||
|
||||
return mFrameAgent.getOrigin();
|
||||
|
|
@ -948,21 +945,21 @@ LLVector3 LLAgent::getReferenceUpVector()
|
|||
{
|
||||
// this vector is in the coordinate frame of the avatar's parent object, or the world if none
|
||||
LLVector3 up_vector = LLVector3::z_axis;
|
||||
if (mAvatarObject.notNull() &&
|
||||
mAvatarObject->getParent() &&
|
||||
mAvatarObject->mDrawable.notNull())
|
||||
if (isAgentAvatarValid() &&
|
||||
gAgentAvatarp->getParent() &&
|
||||
gAgentAvatarp->mDrawable.notNull())
|
||||
{
|
||||
U32 camera_mode = gAgentCamera.mCameraAnimating ? gAgentCamera.mLastCameraMode : gAgentCamera.mCameraMode;
|
||||
U32 camera_mode = gAgentCamera.getCameraAnimating() ? gAgentCamera.getLastCameraMode() : gAgentCamera.getCameraMode();
|
||||
// and in third person...
|
||||
if (camera_mode == CAMERA_MODE_THIRD_PERSON)
|
||||
{
|
||||
// make the up vector point to the absolute +z axis
|
||||
up_vector = up_vector * ~((LLViewerObject*)mAvatarObject->getParent())->getRenderRotation();
|
||||
up_vector = up_vector * ~((LLViewerObject*)gAgentAvatarp->getParent())->getRenderRotation();
|
||||
}
|
||||
else if (camera_mode == CAMERA_MODE_MOUSELOOK)
|
||||
{
|
||||
// make the up vector point to the avatar's +z axis
|
||||
up_vector = up_vector * mAvatarObject->mDrawable->getRotation();
|
||||
up_vector = up_vector * gAgentAvatarp->mDrawable->getRotation();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -998,7 +995,7 @@ F32 LLAgent::clampPitchToLimits(F32 angle)
|
|||
|
||||
F32 angle_from_skyward = acos( mFrameAgent.getAtAxis() * skyward );
|
||||
|
||||
if (mAvatarObject.notNull() && mAvatarObject->isSitting())
|
||||
if (isAgentAvatarValid() && gAgentAvatarp->isSitting())
|
||||
{
|
||||
look_down_limit = 130.f * DEG_TO_RAD;
|
||||
}
|
||||
|
|
@ -1076,17 +1073,6 @@ void LLAgent::setKey(const S32 direction, S32 &key)
|
|||
//-----------------------------------------------------------------------------
|
||||
U32 LLAgent::getControlFlags()
|
||||
{
|
||||
/*
|
||||
// HACK -- avoids maintenance of control flags when camera mode is turned on or off,
|
||||
// only worries about it when the flags are measured
|
||||
if (mCameraMode == CAMERA_MODE_MOUSELOOK)
|
||||
{
|
||||
if ( !(mControlFlags & AGENT_CONTROL_MOUSELOOK) )
|
||||
{
|
||||
mControlFlags |= AGENT_CONTROL_MOUSELOOK;
|
||||
}
|
||||
}
|
||||
*/
|
||||
return mControlFlags;
|
||||
}
|
||||
|
||||
|
|
@ -1182,10 +1168,9 @@ void LLAgent::clearAFK()
|
|||
|
||||
// Gods can sometimes get into away state (via gestures)
|
||||
// without setting the appropriate control flag. JC
|
||||
LLVOAvatar* av = mAvatarObject;
|
||||
if (mControlFlags & AGENT_CONTROL_AWAY
|
||||
|| (av
|
||||
&& (av->mSignaledAnimations.find(ANIM_AGENT_AWAY) != av->mSignaledAnimations.end())))
|
||||
|| (isAgentAvatarValid()
|
||||
&& (gAgentAvatarp->mSignaledAnimations.find(ANIM_AGENT_AWAY) != gAgentAvatarp->mSignaledAnimations.end())))
|
||||
{
|
||||
sendAnimationRequest(ANIM_AGENT_AWAY, ANIM_REQUEST_STOP);
|
||||
clearControlFlags(AGENT_CONTROL_AWAY);
|
||||
|
|
@ -1246,7 +1231,7 @@ BOOL LLAgent::getBusy() const
|
|||
//-----------------------------------------------------------------------------
|
||||
void LLAgent::startAutoPilotGlobal(const LLVector3d &target_global, const std::string& behavior_name, const LLQuaternion *target_rotation, void (*finish_callback)(BOOL, void *), void *callback_data, F32 stop_distance, F32 rot_threshold)
|
||||
{
|
||||
if (!gAgent.getAvatarObject())
|
||||
if (!isAgentAvatarValid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -1307,7 +1292,7 @@ void LLAgent::startAutoPilotGlobal(const LLVector3d &target_global, const std::s
|
|||
LLViewerObject *obj;
|
||||
|
||||
LLWorld::getInstance()->resolveStepHeightGlobal(NULL, target_global, traceEndPt, targetOnGround, groundNorm, &obj);
|
||||
F64 target_height = llmax((F64)gAgent.getAvatarObject()->getPelvisToFoot(), target_global.mdV[VZ] - targetOnGround.mdV[VZ]);
|
||||
F64 target_height = llmax((F64)gAgentAvatarp->getPelvisToFoot(), target_global.mdV[VZ] - targetOnGround.mdV[VZ]);
|
||||
|
||||
// clamp z value of target to minimum height above ground
|
||||
mAutoPilotTargetGlobal.mdV[VZ] = targetOnGround.mdV[VZ] + target_height;
|
||||
|
|
@ -1407,12 +1392,9 @@ void LLAgent::autoPilot(F32 *delta_yaw)
|
|||
mAutoPilotTargetGlobal = object->getPositionGlobal();
|
||||
}
|
||||
|
||||
if (mAvatarObject.isNull())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!isAgentAvatarValid()) return;
|
||||
|
||||
if (mAvatarObject->mInAir)
|
||||
if (gAgentAvatarp->mInAir)
|
||||
{
|
||||
setFlying(TRUE);
|
||||
}
|
||||
|
|
@ -1488,9 +1470,9 @@ void LLAgent::autoPilot(F32 *delta_yaw)
|
|||
// If we're flying, handle autopilot points above or below you.
|
||||
if (getFlying() && xy_distance < AUTOPILOT_HEIGHT_ADJUST_DISTANCE)
|
||||
{
|
||||
if (mAvatarObject.notNull())
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
F64 current_height = mAvatarObject->getPositionGlobal().mdV[VZ];
|
||||
F64 current_height = gAgentAvatarp->getPositionGlobal().mdV[VZ];
|
||||
F32 delta_z = (F32)(mAutoPilotTargetGlobal.mdV[VZ] - current_height);
|
||||
F32 slope = delta_z / xy_distance;
|
||||
if (slope > 0.45f && delta_z > 6.f)
|
||||
|
|
@ -1571,9 +1553,9 @@ void LLAgent::propagate(const F32 dt)
|
|||
pitch(PITCH_RATE * mPitchKey * dt);
|
||||
|
||||
// handle auto-land behavior
|
||||
if (mAvatarObject.notNull())
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
BOOL in_air = mAvatarObject->mInAir;
|
||||
BOOL in_air = gAgentAvatarp->mInAir;
|
||||
LLVector3 land_vel = getVelocity();
|
||||
land_vel.mV[VZ] = 0.f;
|
||||
|
||||
|
|
@ -1626,29 +1608,6 @@ std::ostream& operator<<(std::ostream &s, const LLAgent &agent)
|
|||
return s;
|
||||
}
|
||||
|
||||
|
||||
// ------------------- Beginning of legacy LLCamera hack ----------------------
|
||||
// This section is included for legacy LLCamera support until
|
||||
// it is no longer needed. Some legacy code must exist in
|
||||
// non-legacy functions, and is labeled with "// legacy" comments.
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// setAvatarObject()
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLAgent::setAvatarObject(LLVOAvatarSelf *avatar)
|
||||
{
|
||||
mAvatarObject = avatar;
|
||||
|
||||
if (!avatar)
|
||||
{
|
||||
llinfos << "Setting LLAgent::mAvatarObject to NULL" << llendl;
|
||||
return;
|
||||
}
|
||||
|
||||
gAgentCamera.setAvatarObject(avatar);
|
||||
gAgentWearables.setAvatarObject(avatar);
|
||||
}
|
||||
|
||||
// TRUE if your own avatar needs to be rendered. Usually only
|
||||
// in third person and build.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -1768,14 +1727,14 @@ U8 LLAgent::getRenderState()
|
|||
//-----------------------------------------------------------------------------
|
||||
void LLAgent::endAnimationUpdateUI()
|
||||
{
|
||||
if (gAgentCamera.mCameraMode == gAgentCamera.mLastCameraMode)
|
||||
if (gAgentCamera.getCameraMode() == gAgentCamera.getLastCameraMode())
|
||||
{
|
||||
// We're already done endAnimationUpdateUI for this transition.
|
||||
return;
|
||||
}
|
||||
|
||||
// clean up UI from mode we're leaving
|
||||
if (gAgentCamera.mLastCameraMode == CAMERA_MODE_MOUSELOOK )
|
||||
if (gAgentCamera.getLastCameraMode() == CAMERA_MODE_MOUSELOOK )
|
||||
{
|
||||
// show mouse cursor
|
||||
gViewerWindow->showCursor();
|
||||
|
|
@ -1820,26 +1779,26 @@ void LLAgent::endAnimationUpdateUI()
|
|||
}
|
||||
|
||||
// Disable mouselook-specific animations
|
||||
if (mAvatarObject.notNull())
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
if( mAvatarObject->isAnyAnimationSignaled(AGENT_GUN_AIM_ANIMS, NUM_AGENT_GUN_AIM_ANIMS) )
|
||||
if( gAgentAvatarp->isAnyAnimationSignaled(AGENT_GUN_AIM_ANIMS, NUM_AGENT_GUN_AIM_ANIMS) )
|
||||
{
|
||||
if (mAvatarObject->mSignaledAnimations.find(ANIM_AGENT_AIM_RIFLE_R) != mAvatarObject->mSignaledAnimations.end())
|
||||
if (gAgentAvatarp->mSignaledAnimations.find(ANIM_AGENT_AIM_RIFLE_R) != gAgentAvatarp->mSignaledAnimations.end())
|
||||
{
|
||||
sendAnimationRequest(ANIM_AGENT_AIM_RIFLE_R, ANIM_REQUEST_STOP);
|
||||
sendAnimationRequest(ANIM_AGENT_HOLD_RIFLE_R, ANIM_REQUEST_START);
|
||||
}
|
||||
if (mAvatarObject->mSignaledAnimations.find(ANIM_AGENT_AIM_HANDGUN_R) != mAvatarObject->mSignaledAnimations.end())
|
||||
if (gAgentAvatarp->mSignaledAnimations.find(ANIM_AGENT_AIM_HANDGUN_R) != gAgentAvatarp->mSignaledAnimations.end())
|
||||
{
|
||||
sendAnimationRequest(ANIM_AGENT_AIM_HANDGUN_R, ANIM_REQUEST_STOP);
|
||||
sendAnimationRequest(ANIM_AGENT_HOLD_HANDGUN_R, ANIM_REQUEST_START);
|
||||
}
|
||||
if (mAvatarObject->mSignaledAnimations.find(ANIM_AGENT_AIM_BAZOOKA_R) != mAvatarObject->mSignaledAnimations.end())
|
||||
if (gAgentAvatarp->mSignaledAnimations.find(ANIM_AGENT_AIM_BAZOOKA_R) != gAgentAvatarp->mSignaledAnimations.end())
|
||||
{
|
||||
sendAnimationRequest(ANIM_AGENT_AIM_BAZOOKA_R, ANIM_REQUEST_STOP);
|
||||
sendAnimationRequest(ANIM_AGENT_HOLD_BAZOOKA_R, ANIM_REQUEST_START);
|
||||
}
|
||||
if (mAvatarObject->mSignaledAnimations.find(ANIM_AGENT_AIM_BOW_L) != mAvatarObject->mSignaledAnimations.end())
|
||||
if (gAgentAvatarp->mSignaledAnimations.find(ANIM_AGENT_AIM_BOW_L) != gAgentAvatarp->mSignaledAnimations.end())
|
||||
{
|
||||
sendAnimationRequest(ANIM_AGENT_AIM_BOW_L, ANIM_REQUEST_STOP);
|
||||
sendAnimationRequest(ANIM_AGENT_HOLD_BOW_L, ANIM_REQUEST_START);
|
||||
|
|
@ -1847,7 +1806,7 @@ void LLAgent::endAnimationUpdateUI()
|
|||
}
|
||||
}
|
||||
}
|
||||
else if(gAgentCamera.mLastCameraMode == CAMERA_MODE_CUSTOMIZE_AVATAR)
|
||||
else if (gAgentCamera.getLastCameraMode() == CAMERA_MODE_CUSTOMIZE_AVATAR)
|
||||
{
|
||||
// make sure we ask to save changes
|
||||
|
||||
|
|
@ -1858,7 +1817,7 @@ void LLAgent::endAnimationUpdateUI()
|
|||
gMorphView->setVisible( FALSE );
|
||||
}
|
||||
|
||||
if (mAvatarObject.notNull())
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
if(mCustomAnim)
|
||||
{
|
||||
|
|
@ -1875,7 +1834,7 @@ void LLAgent::endAnimationUpdateUI()
|
|||
//---------------------------------------------------------------------
|
||||
// Set up UI for mode we're entering
|
||||
//---------------------------------------------------------------------
|
||||
if (gAgentCamera.mCameraMode == CAMERA_MODE_MOUSELOOK)
|
||||
if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK)
|
||||
{
|
||||
// hide menus
|
||||
gMenuBarView->setVisible(FALSE);
|
||||
|
|
@ -1890,7 +1849,7 @@ void LLAgent::endAnimationUpdateUI()
|
|||
LLPanelStandStopFlying::getInstance()->setVisible(FALSE);
|
||||
|
||||
// clear out camera lag effect
|
||||
gAgentCamera.mCameraLag.clearVec();
|
||||
gAgentCamera.clearCameraLag();
|
||||
|
||||
// JC - Added for always chat in third person option
|
||||
gFocusMgr.setKeyboardFocus(NULL);
|
||||
|
|
@ -1918,49 +1877,49 @@ void LLAgent::endAnimationUpdateUI()
|
|||
|
||||
gConsole->setVisible( TRUE );
|
||||
|
||||
if (mAvatarObject.notNull())
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
// Trigger mouselook-specific animations
|
||||
if( mAvatarObject->isAnyAnimationSignaled(AGENT_GUN_HOLD_ANIMS, NUM_AGENT_GUN_HOLD_ANIMS) )
|
||||
if( gAgentAvatarp->isAnyAnimationSignaled(AGENT_GUN_HOLD_ANIMS, NUM_AGENT_GUN_HOLD_ANIMS) )
|
||||
{
|
||||
if (mAvatarObject->mSignaledAnimations.find(ANIM_AGENT_HOLD_RIFLE_R) != mAvatarObject->mSignaledAnimations.end())
|
||||
if (gAgentAvatarp->mSignaledAnimations.find(ANIM_AGENT_HOLD_RIFLE_R) != gAgentAvatarp->mSignaledAnimations.end())
|
||||
{
|
||||
sendAnimationRequest(ANIM_AGENT_HOLD_RIFLE_R, ANIM_REQUEST_STOP);
|
||||
sendAnimationRequest(ANIM_AGENT_AIM_RIFLE_R, ANIM_REQUEST_START);
|
||||
}
|
||||
if (mAvatarObject->mSignaledAnimations.find(ANIM_AGENT_HOLD_HANDGUN_R) != mAvatarObject->mSignaledAnimations.end())
|
||||
if (gAgentAvatarp->mSignaledAnimations.find(ANIM_AGENT_HOLD_HANDGUN_R) != gAgentAvatarp->mSignaledAnimations.end())
|
||||
{
|
||||
sendAnimationRequest(ANIM_AGENT_HOLD_HANDGUN_R, ANIM_REQUEST_STOP);
|
||||
sendAnimationRequest(ANIM_AGENT_AIM_HANDGUN_R, ANIM_REQUEST_START);
|
||||
}
|
||||
if (mAvatarObject->mSignaledAnimations.find(ANIM_AGENT_HOLD_BAZOOKA_R) != mAvatarObject->mSignaledAnimations.end())
|
||||
if (gAgentAvatarp->mSignaledAnimations.find(ANIM_AGENT_HOLD_BAZOOKA_R) != gAgentAvatarp->mSignaledAnimations.end())
|
||||
{
|
||||
sendAnimationRequest(ANIM_AGENT_HOLD_BAZOOKA_R, ANIM_REQUEST_STOP);
|
||||
sendAnimationRequest(ANIM_AGENT_AIM_BAZOOKA_R, ANIM_REQUEST_START);
|
||||
}
|
||||
if (mAvatarObject->mSignaledAnimations.find(ANIM_AGENT_HOLD_BOW_L) != mAvatarObject->mSignaledAnimations.end())
|
||||
if (gAgentAvatarp->mSignaledAnimations.find(ANIM_AGENT_HOLD_BOW_L) != gAgentAvatarp->mSignaledAnimations.end())
|
||||
{
|
||||
sendAnimationRequest(ANIM_AGENT_HOLD_BOW_L, ANIM_REQUEST_STOP);
|
||||
sendAnimationRequest(ANIM_AGENT_AIM_BOW_L, ANIM_REQUEST_START);
|
||||
}
|
||||
}
|
||||
if (mAvatarObject->getParent())
|
||||
if (gAgentAvatarp->getParent())
|
||||
{
|
||||
LLVector3 at_axis = LLViewerCamera::getInstance()->getAtAxis();
|
||||
LLViewerObject* root_object = (LLViewerObject*)mAvatarObject->getRoot();
|
||||
LLViewerObject* root_object = (LLViewerObject*)gAgentAvatarp->getRoot();
|
||||
if (root_object->flagCameraDecoupled())
|
||||
{
|
||||
resetAxes(at_axis);
|
||||
}
|
||||
else
|
||||
{
|
||||
resetAxes(at_axis * ~((LLViewerObject*)mAvatarObject->getParent())->getRenderRotation());
|
||||
resetAxes(at_axis * ~((LLViewerObject*)gAgentAvatarp->getParent())->getRenderRotation());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else if (gAgentCamera.mCameraMode == CAMERA_MODE_CUSTOMIZE_AVATAR)
|
||||
else if (gAgentCamera.getCameraMode() == CAMERA_MODE_CUSTOMIZE_AVATAR)
|
||||
{
|
||||
LLToolMgr::getInstance()->setCurrentToolset(gFaceEditToolset);
|
||||
|
||||
|
|
@ -1970,23 +1929,22 @@ void LLAgent::endAnimationUpdateUI()
|
|||
}
|
||||
|
||||
// freeze avatar
|
||||
if (mAvatarObject.notNull())
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
mPauseRequest = mAvatarObject->requestPause();
|
||||
mPauseRequest = gAgentAvatarp->requestPause();
|
||||
}
|
||||
}
|
||||
|
||||
if (getAvatarObject())
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
getAvatarObject()->updateAttachmentVisibility(gAgentCamera.mCameraMode);
|
||||
gAgentAvatarp->updateAttachmentVisibility(gAgentCamera.getCameraMode());
|
||||
}
|
||||
|
||||
gFloaterTools->dirty();
|
||||
|
||||
// Don't let this be called more than once if the camera
|
||||
// mode hasn't changed. --JC
|
||||
gAgentCamera.mLastCameraMode = gAgentCamera.mCameraMode;
|
||||
|
||||
gAgentCamera.updateLastCamera();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -2055,10 +2013,10 @@ void LLAgent::setStartPosition( U32 location_id )
|
|||
|
||||
LLVector3 agent_pos = getPositionAgent();
|
||||
|
||||
if (mAvatarObject.notNull())
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
// the z height is at the agent's feet
|
||||
agent_pos.mV[VZ] -= 0.5f * mAvatarObject->mBodySize.mV[VZ];
|
||||
agent_pos.mV[VZ] -= 0.5f * gAgentAvatarp->mBodySize.mV[VZ];
|
||||
}
|
||||
|
||||
agent_pos.mV[VX] = llclamp( agent_pos.mV[VX], INSET, REGION_WIDTH - INSET );
|
||||
|
|
@ -2165,7 +2123,7 @@ void LLAgent::onAnimStop(const LLUUID& id)
|
|||
setControlFlags(AGENT_CONTROL_FINISH_ANIM);
|
||||
|
||||
// now trigger dusting self off animation
|
||||
if (mAvatarObject.notNull() && !mAvatarObject->mBelowWater && rand() % 3 == 0)
|
||||
if (isAgentAvatarValid() && !gAgentAvatarp->mBelowWater && rand() % 3 == 0)
|
||||
sendAnimationRequest( ANIM_AGENT_BRUSH, ANIM_REQUEST_START );
|
||||
}
|
||||
else if (id == ANIM_AGENT_PRE_JUMP || id == ANIM_AGENT_LAND || id == ANIM_AGENT_MEDIUM_LAND)
|
||||
|
|
@ -2364,9 +2322,9 @@ void LLAgent::buildFullnameAndTitle(std::string& name) const
|
|||
name.erase(0, name.length());
|
||||
}
|
||||
|
||||
if (mAvatarObject.notNull())
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
name += mAvatarObject->getFullname();
|
||||
name += gAgentAvatarp->getFullname();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2512,14 +2470,14 @@ BOOL LLAgent::canJoinGroups() const
|
|||
|
||||
LLQuaternion LLAgent::getHeadRotation()
|
||||
{
|
||||
if (mAvatarObject.isNull() || !mAvatarObject->mPelvisp || !mAvatarObject->mHeadp)
|
||||
if (!isAgentAvatarValid() || !gAgentAvatarp->mPelvisp || !gAgentAvatarp->mHeadp)
|
||||
{
|
||||
return LLQuaternion::DEFAULT;
|
||||
}
|
||||
|
||||
if (!gAgentCamera.cameraMouselook())
|
||||
{
|
||||
return mAvatarObject->getRotation();
|
||||
return gAgentAvatarp->getRotation();
|
||||
}
|
||||
|
||||
// We must be in mouselook
|
||||
|
|
@ -2528,9 +2486,9 @@ LLQuaternion LLAgent::getHeadRotation()
|
|||
LLVector3 left = up % look_dir;
|
||||
|
||||
LLQuaternion rot(look_dir, left, up);
|
||||
if (mAvatarObject->getParent())
|
||||
if (gAgentAvatarp->getParent())
|
||||
{
|
||||
rot = rot * ~mAvatarObject->getParent()->getRotation();
|
||||
rot = rot * ~gAgentAvatarp->getParent()->getRotation();
|
||||
}
|
||||
|
||||
return rot;
|
||||
|
|
@ -3153,8 +3111,7 @@ void LLAgent::processAgentCachedTextureResponse(LLMessageSystem *mesgsys, void *
|
|||
{
|
||||
gAgentQueryManager.mNumPendingQueries--;
|
||||
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
if (!avatarp || avatarp->isDead())
|
||||
if (!isAgentAvatarValid() || gAgentAvatarp->isDead())
|
||||
{
|
||||
llwarns << "No avatar for user in cached texture update!" << llendl;
|
||||
return;
|
||||
|
|
@ -3187,27 +3144,27 @@ void LLAgent::processAgentCachedTextureResponse(LLMessageSystem *mesgsys, void *
|
|||
if (texture_id.notNull())
|
||||
{
|
||||
//llinfos << "Received cached texture " << (U32)texture_index << ": " << texture_id << llendl;
|
||||
avatarp->setCachedBakedTexture(LLVOAvatarDictionary::bakedToLocalTextureIndex((EBakedTextureIndex)texture_index), texture_id);
|
||||
//avatarp->setTETexture( LLVOAvatar::sBakedTextureIndices[texture_index], texture_id );
|
||||
gAgentAvatarp->setCachedBakedTexture(LLVOAvatarDictionary::bakedToLocalTextureIndex((EBakedTextureIndex)texture_index), texture_id);
|
||||
//gAgentAvatarp->setTETexture( LLVOAvatar::sBakedTextureIndices[texture_index], texture_id );
|
||||
gAgentQueryManager.mActiveCacheQueries[texture_index] = 0;
|
||||
num_results++;
|
||||
}
|
||||
else
|
||||
{
|
||||
// no cache of this bake. request upload.
|
||||
avatarp->requestLayerSetUpload((EBakedTextureIndex)texture_index);
|
||||
gAgentAvatarp->requestLayerSetUpload((EBakedTextureIndex)texture_index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
llinfos << "Received cached texture response for " << num_results << " textures." << llendl;
|
||||
|
||||
avatarp->updateMeshTextures();
|
||||
gAgentAvatarp->updateMeshTextures();
|
||||
|
||||
if (gAgentQueryManager.mNumPendingQueries == 0)
|
||||
{
|
||||
// RN: not sure why composites are disabled at this point
|
||||
avatarp->setCompositeUpdatesEnabled(TRUE);
|
||||
gAgentAvatarp->setCompositeUpdatesEnabled(TRUE);
|
||||
gAgent.sendAgentSetAppearance();
|
||||
}
|
||||
}
|
||||
|
|
@ -3260,11 +3217,10 @@ BOOL LLAgent::getHomePosGlobal( LLVector3d* pos_global )
|
|||
|
||||
void LLAgent::clearVisualParams(void *data)
|
||||
{
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
if (avatarp)
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
avatarp->clearVisualParamWeights();
|
||||
avatarp->updateVisualParams();
|
||||
gAgentAvatarp->clearVisualParamWeights();
|
||||
gAgentAvatarp->updateVisualParams();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3288,16 +3244,15 @@ bool LLAgent::teleportCore(bool is_local)
|
|||
// sync with other viewers. Discuss in DEV-14145/VWR-6744 before reenabling.
|
||||
|
||||
// Stop all animation before actual teleporting
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
if (avatarp)
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
for ( LLVOAvatar::AnimIterator anim_it= avatarp->mPlayingAnimations.begin();
|
||||
anim_it != avatarp->mPlayingAnimations.end();
|
||||
for ( LLVOAvatar::AnimIterator anim_it= gAgentAvatarp->mPlayingAnimations.begin();
|
||||
anim_it != gAgentAvatarp->mPlayingAnimations.end();
|
||||
++anim_it)
|
||||
{
|
||||
avatarp->stopMotion(anim_it->first);
|
||||
gAgentAvatarp->stopMotion(anim_it->first);
|
||||
}
|
||||
avatarp->processAnimationStateChanges();
|
||||
gAgentAvatarp->processAnimationStateChanges();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -3490,13 +3445,11 @@ void LLAgent::stopCurrentAnimations()
|
|||
{
|
||||
// This function stops all current overriding animations on this
|
||||
// avatar, propagating this change back to the server.
|
||||
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
if (avatarp)
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
for ( LLVOAvatar::AnimIterator anim_it =
|
||||
avatarp->mPlayingAnimations.begin();
|
||||
anim_it != avatarp->mPlayingAnimations.end();
|
||||
gAgentAvatarp->mPlayingAnimations.begin();
|
||||
anim_it != gAgentAvatarp->mPlayingAnimations.end();
|
||||
anim_it++)
|
||||
{
|
||||
if (anim_it->first ==
|
||||
|
|
@ -3509,7 +3462,7 @@ void LLAgent::stopCurrentAnimations()
|
|||
else
|
||||
{
|
||||
// stop this animation locally
|
||||
avatarp->stopMotion(anim_it->first, TRUE);
|
||||
gAgentAvatarp->stopMotion(anim_it->first, TRUE);
|
||||
// ...and tell the server to tell everyone.
|
||||
sendAnimationRequest(anim_it->first, ANIM_REQUEST_STOP);
|
||||
}
|
||||
|
|
@ -3616,7 +3569,7 @@ void LLAgent::requestLeaveGodMode()
|
|||
//-----------------------------------------------------------------------------
|
||||
void LLAgent::sendAgentSetAppearance()
|
||||
{
|
||||
if (mAvatarObject.isNull()) return;
|
||||
if (!isAgentAvatarValid()) return;
|
||||
|
||||
if (gAgentQueryManager.mNumPendingQueries > 0 && !gAgentCamera.cameraCustomizeAvatar())
|
||||
{
|
||||
|
|
@ -3624,7 +3577,7 @@ void LLAgent::sendAgentSetAppearance()
|
|||
}
|
||||
|
||||
|
||||
llinfos << "TAT: Sent AgentSetAppearance: " << mAvatarObject->getBakedStatusForPrintout() << llendl;
|
||||
llinfos << "TAT: Sent AgentSetAppearance: " << gAgentAvatarp->getBakedStatusForPrintout() << llendl;
|
||||
//dumpAvatarTEs( "sendAgentSetAppearance()" );
|
||||
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
|
|
@ -3638,7 +3591,7 @@ void LLAgent::sendAgentSetAppearance()
|
|||
// NOTE -- when we start correcting all of the other Havok geometry
|
||||
// to compensate for the COLLISION_TOLERANCE ugliness we will have
|
||||
// to tweak this number again
|
||||
const LLVector3 body_size = mAvatarObject->mBodySize;
|
||||
const LLVector3 body_size = gAgentAvatarp->mBodySize;
|
||||
msg->addVector3Fast(_PREHASH_Size, body_size);
|
||||
|
||||
// To guard against out of order packets
|
||||
|
|
@ -3648,20 +3601,20 @@ void LLAgent::sendAgentSetAppearance()
|
|||
|
||||
// is texture data current relative to wearables?
|
||||
// KLW - TAT this will probably need to check the local queue.
|
||||
BOOL textures_current = mAvatarObject->areTexturesCurrent();
|
||||
BOOL textures_current = gAgentAvatarp->areTexturesCurrent();
|
||||
|
||||
for(U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++ )
|
||||
{
|
||||
const ETextureIndex texture_index = LLVOAvatarDictionary::bakedToLocalTextureIndex((EBakedTextureIndex)baked_index);
|
||||
|
||||
// if we're not wearing a skirt, we don't need the texture to be baked
|
||||
if (texture_index == TEX_SKIRT_BAKED && !mAvatarObject->isWearingWearableType(WT_SKIRT))
|
||||
if (texture_index == TEX_SKIRT_BAKED && !gAgentAvatarp->isWearingWearableType(WT_SKIRT))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// IMG_DEFAULT_AVATAR means not baked. 0 index should be ignored for baked textures
|
||||
if (!mAvatarObject->isTextureDefined(texture_index, 0))
|
||||
if (!gAgentAvatarp->isTextureDefined(texture_index, 0))
|
||||
{
|
||||
textures_current = FALSE;
|
||||
break;
|
||||
|
|
@ -3699,7 +3652,7 @@ void LLAgent::sendAgentSetAppearance()
|
|||
msg->addU8Fast(_PREHASH_TextureIndex, (U8)texture_index);
|
||||
}
|
||||
msg->nextBlockFast(_PREHASH_ObjectData);
|
||||
mAvatarObject->sendAppearanceMessage( gMessageSystem );
|
||||
gAgentAvatarp->sendAppearanceMessage( gMessageSystem );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -3712,9 +3665,9 @@ void LLAgent::sendAgentSetAppearance()
|
|||
|
||||
|
||||
S32 transmitted_params = 0;
|
||||
for (LLViewerVisualParam* param = (LLViewerVisualParam*)mAvatarObject->getFirstVisualParam();
|
||||
for (LLViewerVisualParam* param = (LLViewerVisualParam*)gAgentAvatarp->getFirstVisualParam();
|
||||
param;
|
||||
param = (LLViewerVisualParam*)mAvatarObject->getNextVisualParam())
|
||||
param = (LLViewerVisualParam*)gAgentAvatarp->getNextVisualParam())
|
||||
{
|
||||
if (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ extern const U8 AGENT_STATE_TYPING; // Typing indication
|
|||
extern const U8 AGENT_STATE_EDITING; // Set when agent has objects selected
|
||||
|
||||
class LLChat;
|
||||
class LLVOAvatarSelf;
|
||||
class LLViewerRegion;
|
||||
class LLMotion;
|
||||
class LLToolset;
|
||||
|
|
@ -109,7 +108,6 @@ public:
|
|||
virtual ~LLAgent();
|
||||
void init();
|
||||
void cleanup();
|
||||
void setAvatarObject(LLVOAvatarSelf *avatar);
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Login
|
||||
|
|
@ -171,20 +169,6 @@ private:
|
|||
** **
|
||||
*******************************************************************************/
|
||||
|
||||
/********************************************************************************
|
||||
** **
|
||||
** GENERAL ACCESSORS
|
||||
**/
|
||||
|
||||
public:
|
||||
LLVOAvatarSelf* getAvatarObject() const { return mAvatarObject; }
|
||||
private:
|
||||
LLPointer<LLVOAvatarSelf> mAvatarObject; // NULL until avatar object sent down from simulator
|
||||
|
||||
/** General Accessors
|
||||
** **
|
||||
*******************************************************************************/
|
||||
|
||||
/********************************************************************************
|
||||
** **
|
||||
** POSITION
|
||||
|
|
|
|||
|
|
@ -372,10 +372,9 @@ void LLAgentCamera::unlockView()
|
|||
{
|
||||
if (getFocusOnAvatar())
|
||||
{
|
||||
LLVOAvatarSelf *avatarp = gAgent.getAvatarObject();
|
||||
if (avatarp)
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
setFocusGlobal(LLVector3d::zero, avatarp->mID);
|
||||
setFocusGlobal(LLVector3d::zero, gAgentAvatarp->mID);
|
||||
}
|
||||
setFocusOnAvatar(FALSE, FALSE); // no animation
|
||||
}
|
||||
|
|
@ -1092,30 +1091,25 @@ void LLAgentCamera::updateLookAt(const S32 mouse_x, const S32 mouse_y)
|
|||
{
|
||||
static LLVector3 last_at_axis;
|
||||
|
||||
LLVOAvatarSelf *avatarp = gAgent.getAvatarObject();
|
||||
if (!isAgentAvatarValid()) return;
|
||||
|
||||
if (!avatarp)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLQuaternion av_inv_rot = ~avatarp->mRoot.getWorldRotation();
|
||||
LLVector3 root_at = LLVector3::x_axis * avatarp->mRoot.getWorldRotation();
|
||||
LLQuaternion av_inv_rot = ~gAgentAvatarp->mRoot.getWorldRotation();
|
||||
LLVector3 root_at = LLVector3::x_axis * gAgentAvatarp->mRoot.getWorldRotation();
|
||||
|
||||
if ((gViewerWindow->getMouseVelocityStat()->getCurrent() < 0.01f) &&
|
||||
(root_at * last_at_axis > 0.95f))
|
||||
{
|
||||
LLVector3 vel = avatarp->getVelocity();
|
||||
LLVector3 vel = gAgentAvatarp->getVelocity();
|
||||
if (vel.magVecSquared() > 4.f)
|
||||
{
|
||||
setLookAt(LOOKAT_TARGET_IDLE, avatarp, vel * av_inv_rot);
|
||||
setLookAt(LOOKAT_TARGET_IDLE, gAgentAvatarp, vel * av_inv_rot);
|
||||
}
|
||||
else
|
||||
{
|
||||
// *FIX: rotate mframeagent by sit object's rotation?
|
||||
LLQuaternion look_rotation = avatarp->isSitting() ? avatarp->getRenderRotation() : gAgent.getFrameAgent().getQuaternion(); // use camera's current rotation
|
||||
LLQuaternion look_rotation = gAgentAvatarp->isSitting() ? gAgentAvatarp->getRenderRotation() : gAgent.getFrameAgent().getQuaternion(); // use camera's current rotation
|
||||
LLVector3 look_offset = LLVector3(2.f, 0.f, 0.f) * look_rotation * av_inv_rot;
|
||||
setLookAt(LOOKAT_TARGET_IDLE, avatarp, look_offset);
|
||||
setLookAt(LOOKAT_TARGET_IDLE, gAgentAvatarp, look_offset);
|
||||
}
|
||||
last_at_axis = root_at;
|
||||
return;
|
||||
|
|
@ -1125,7 +1119,7 @@ void LLAgentCamera::updateLookAt(const S32 mouse_x, const S32 mouse_y)
|
|||
|
||||
if (CAMERA_MODE_CUSTOMIZE_AVATAR == getCameraMode())
|
||||
{
|
||||
setLookAt(LOOKAT_TARGET_NONE, avatarp, LLVector3(-2.f, 0.f, 0.f));
|
||||
setLookAt(LOOKAT_TARGET_NONE, gAgentAvatarp, LLVector3(-2.f, 0.f, 0.f));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1154,7 +1148,7 @@ void LLAgentCamera::updateLookAt(const S32 mouse_x, const S32 mouse_y)
|
|||
headLookAxis = frameCamera.getAtAxis();
|
||||
// RN: we use world-space offset for mouselook and freelook
|
||||
//headLookAxis = headLookAxis * av_inv_rot;
|
||||
setLookAt(lookAtType, avatarp, headLookAxis);
|
||||
setLookAt(lookAtType, gAgentAvatarp, headLookAxis);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1175,15 +1169,13 @@ void LLAgentCamera::updateCamera()
|
|||
|
||||
validateFocusObject();
|
||||
|
||||
LLVOAvatarSelf *avatarp = gAgent.getAvatarObject();
|
||||
|
||||
if (avatarp &&
|
||||
avatarp->isSitting() &&
|
||||
if (isAgentAvatarValid() &&
|
||||
gAgentAvatarp->isSitting() &&
|
||||
camera_mode == CAMERA_MODE_MOUSELOOK)
|
||||
{
|
||||
//Ventrella
|
||||
//changed camera_skyward to the new global "mCameraUpVector"
|
||||
mCameraUpVector = mCameraUpVector * avatarp->getRenderRotation();
|
||||
mCameraUpVector = mCameraUpVector * gAgentAvatarp->getRenderRotation();
|
||||
//end Ventrella
|
||||
}
|
||||
|
||||
|
|
@ -1291,7 +1283,7 @@ void LLAgentCamera::updateCamera()
|
|||
//Ventrella
|
||||
if ( mCameraMode == CAMERA_MODE_FOLLOW )
|
||||
{
|
||||
if (avatarp)
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
//--------------------------------------------------------------------------------
|
||||
// this is where the avatar's position and rotation are given to followCam, and
|
||||
|
|
@ -1299,13 +1291,13 @@ void LLAgentCamera::updateCamera()
|
|||
// (2) focus, and (3) upvector. They can then be queried elsewhere in llAgent.
|
||||
//--------------------------------------------------------------------------------
|
||||
// *TODO: use combined rotation of frameagent and sit object
|
||||
LLQuaternion avatarRotationForFollowCam = avatarp->isSitting() ? avatarp->getRenderRotation() : gAgent.getFrameAgent().getQuaternion();
|
||||
LLQuaternion avatarRotationForFollowCam = gAgentAvatarp->isSitting() ? gAgentAvatarp->getRenderRotation() : gAgent.getFrameAgent().getQuaternion();
|
||||
|
||||
LLFollowCamParams* current_cam = LLFollowCamMgr::getActiveFollowCamParams();
|
||||
if (current_cam)
|
||||
{
|
||||
mFollowCam.copyParams(*current_cam);
|
||||
mFollowCam.setSubjectPositionAndRotation( avatarp->getRenderPosition(), avatarRotationForFollowCam );
|
||||
mFollowCam.setSubjectPositionAndRotation( gAgentAvatarp->getRenderPosition(), avatarRotationForFollowCam );
|
||||
mFollowCam.update();
|
||||
LLViewerJoystick::getInstance()->setCameraNeedsUpdate(true);
|
||||
}
|
||||
|
|
@ -1380,9 +1372,9 @@ void LLAgentCamera::updateCamera()
|
|||
gAgent.setShowAvatar(TRUE);
|
||||
}
|
||||
|
||||
if (avatarp && (mCameraMode != CAMERA_MODE_MOUSELOOK))
|
||||
if (isAgentAvatarValid() && (mCameraMode != CAMERA_MODE_MOUSELOOK))
|
||||
{
|
||||
avatarp->updateAttachmentVisibility(mCameraMode);
|
||||
gAgentAvatarp->updateAttachmentVisibility(mCameraMode);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -1480,40 +1472,40 @@ void LLAgentCamera::updateCamera()
|
|||
}
|
||||
gAgent.setLastPositionGlobal(global_pos);
|
||||
|
||||
if (LLVOAvatar::sVisibleInFirstPerson && avatarp && !avatarp->isSitting() && cameraMouselook())
|
||||
if (LLVOAvatar::sVisibleInFirstPerson && isAgentAvatarValid() && !gAgentAvatarp->isSitting() && cameraMouselook())
|
||||
{
|
||||
LLVector3 head_pos = avatarp->mHeadp->getWorldPosition() +
|
||||
LLVector3(0.08f, 0.f, 0.05f) * avatarp->mHeadp->getWorldRotation() +
|
||||
LLVector3(0.1f, 0.f, 0.f) * avatarp->mPelvisp->getWorldRotation();
|
||||
LLVector3 head_pos = gAgentAvatarp->mHeadp->getWorldPosition() +
|
||||
LLVector3(0.08f, 0.f, 0.05f) * gAgentAvatarp->mHeadp->getWorldRotation() +
|
||||
LLVector3(0.1f, 0.f, 0.f) * gAgentAvatarp->mPelvisp->getWorldRotation();
|
||||
LLVector3 diff = mCameraPositionAgent - head_pos;
|
||||
diff = diff * ~avatarp->mRoot.getWorldRotation();
|
||||
diff = diff * ~gAgentAvatarp->mRoot.getWorldRotation();
|
||||
|
||||
LLJoint* torso_joint = avatarp->mTorsop;
|
||||
LLJoint* chest_joint = avatarp->mChestp;
|
||||
LLJoint* torso_joint = gAgentAvatarp->mTorsop;
|
||||
LLJoint* chest_joint = gAgentAvatarp->mChestp;
|
||||
LLVector3 torso_scale = torso_joint->getScale();
|
||||
LLVector3 chest_scale = chest_joint->getScale();
|
||||
|
||||
// shorten avatar skeleton to avoid foot interpenetration
|
||||
if (!avatarp->mInAir)
|
||||
if (!gAgentAvatarp->mInAir)
|
||||
{
|
||||
LLVector3 chest_offset = LLVector3(0.f, 0.f, chest_joint->getPosition().mV[VZ]) * torso_joint->getWorldRotation();
|
||||
F32 z_compensate = llclamp(-diff.mV[VZ], -0.2f, 1.f);
|
||||
F32 scale_factor = llclamp(1.f - ((z_compensate * 0.5f) / chest_offset.mV[VZ]), 0.5f, 1.2f);
|
||||
torso_joint->setScale(LLVector3(1.f, 1.f, scale_factor));
|
||||
|
||||
LLJoint* neck_joint = avatarp->mNeckp;
|
||||
LLJoint* neck_joint = gAgentAvatarp->mNeckp;
|
||||
LLVector3 neck_offset = LLVector3(0.f, 0.f, neck_joint->getPosition().mV[VZ]) * chest_joint->getWorldRotation();
|
||||
scale_factor = llclamp(1.f - ((z_compensate * 0.5f) / neck_offset.mV[VZ]), 0.5f, 1.2f);
|
||||
chest_joint->setScale(LLVector3(1.f, 1.f, scale_factor));
|
||||
diff.mV[VZ] = 0.f;
|
||||
}
|
||||
|
||||
avatarp->mPelvisp->setPosition(avatarp->mPelvisp->getPosition() + diff);
|
||||
gAgentAvatarp->mPelvisp->setPosition(gAgentAvatarp->mPelvisp->getPosition() + diff);
|
||||
|
||||
avatarp->mRoot.updateWorldMatrixChildren();
|
||||
gAgentAvatarp->mRoot.updateWorldMatrixChildren();
|
||||
|
||||
for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin();
|
||||
iter != avatarp->mAttachmentPoints.end(); )
|
||||
for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin();
|
||||
iter != gAgentAvatarp->mAttachmentPoints.end(); )
|
||||
{
|
||||
LLVOAvatar::attachment_map_t::iterator curiter = iter++;
|
||||
LLViewerJointAttachment* attachment = curiter->second;
|
||||
|
|
@ -1537,6 +1529,11 @@ void LLAgentCamera::updateCamera()
|
|||
}
|
||||
}
|
||||
|
||||
void LLAgentCamera::updateLastCamera()
|
||||
{
|
||||
mLastCameraMode = mCameraMode;
|
||||
}
|
||||
|
||||
void LLAgentCamera::updateFocusOffset()
|
||||
{
|
||||
validateFocusObject();
|
||||
|
|
@ -1600,8 +1597,6 @@ LLVector3d LLAgentCamera::calcFocusPositionTargetGlobal()
|
|||
clearFocusObject();
|
||||
}
|
||||
|
||||
LLVOAvatarSelf *avatarp = gAgent.getAvatarObject();
|
||||
|
||||
// Ventrella
|
||||
if (mCameraMode == CAMERA_MODE_FOLLOW && mFocusOnAvatar)
|
||||
{
|
||||
|
|
@ -1612,12 +1607,12 @@ LLVector3d LLAgentCamera::calcFocusPositionTargetGlobal()
|
|||
{
|
||||
LLVector3d at_axis(1.0, 0.0, 0.0);
|
||||
LLQuaternion agent_rot = gAgent.getFrameAgent().getQuaternion();
|
||||
if (avatarp && avatarp->getParent())
|
||||
if (isAgentAvatarValid() && gAgentAvatarp->getParent())
|
||||
{
|
||||
LLViewerObject* root_object = (LLViewerObject*)avatarp->getRoot();
|
||||
LLViewerObject* root_object = (LLViewerObject*)gAgentAvatarp->getRoot();
|
||||
if (!root_object->flagCameraDecoupled())
|
||||
{
|
||||
agent_rot *= ((LLViewerObject*)(avatarp->getParent()))->getRenderRotation();
|
||||
agent_rot *= ((LLViewerObject*)(gAgentAvatarp->getParent()))->getRenderRotation();
|
||||
}
|
||||
}
|
||||
at_axis = at_axis * agent_rot;
|
||||
|
|
@ -1667,7 +1662,7 @@ LLVector3d LLAgentCamera::calcFocusPositionTargetGlobal()
|
|||
}
|
||||
return mFocusTargetGlobal;
|
||||
}
|
||||
else if (mSitCameraEnabled && avatarp && avatarp->isSitting() && mSitCameraReferenceObject.notNull())
|
||||
else if (mSitCameraEnabled && isAgentAvatarValid() && gAgentAvatarp->isSitting() && mSitCameraReferenceObject.notNull())
|
||||
{
|
||||
// sit camera
|
||||
LLVector3 object_pos = mSitCameraReferenceObject->getRenderPosition();
|
||||
|
|
@ -1686,12 +1681,10 @@ LLVector3d LLAgentCamera::calcThirdPersonFocusOffset()
|
|||
{
|
||||
// ...offset from avatar
|
||||
LLVector3d focus_offset;
|
||||
|
||||
LLVOAvatarSelf *avatarp = gAgent.getAvatarObject();
|
||||
LLQuaternion agent_rot = gAgent.getFrameAgent().getQuaternion();
|
||||
if (avatarp && avatarp->getParent())
|
||||
if (isAgentAvatarValid() && gAgentAvatarp->getParent())
|
||||
{
|
||||
agent_rot *= ((LLViewerObject*)(avatarp->getParent()))->getRenderRotation();
|
||||
agent_rot *= ((LLViewerObject*)(gAgentAvatarp->getParent()))->getRenderRotation();
|
||||
}
|
||||
|
||||
focus_offset = mFocusOffsetInitial[mCameraPreset] * agent_rot;
|
||||
|
|
@ -1700,12 +1693,10 @@ LLVector3d LLAgentCamera::calcThirdPersonFocusOffset()
|
|||
|
||||
void LLAgentCamera::setupSitCamera()
|
||||
{
|
||||
LLVOAvatarSelf *avatarp = gAgent.getAvatarObject();
|
||||
|
||||
// agent frame entering this function is in world coordinates
|
||||
if (avatarp && avatarp->getParent())
|
||||
if (isAgentAvatarValid() && gAgentAvatarp->getParent())
|
||||
{
|
||||
LLQuaternion parent_rot = ((LLViewerObject*)avatarp->getParent())->getRenderRotation();
|
||||
LLQuaternion parent_rot = ((LLViewerObject*)gAgentAvatarp->getParent())->getRenderRotation();
|
||||
// slam agent coordinate frame to proper parent local version
|
||||
LLVector3 at_axis = gAgent.getFrameAgent().getAtAxis();
|
||||
at_axis.mV[VZ] = 0.f;
|
||||
|
|
@ -1768,13 +1759,11 @@ F32 LLAgentCamera::calcCameraFOVZoomFactor()
|
|||
//-----------------------------------------------------------------------------
|
||||
LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
|
||||
{
|
||||
LLVOAvatarSelf *avatarp = gAgent.getAvatarObject();
|
||||
|
||||
// Compute base camera position and look-at points.
|
||||
F32 camera_land_height;
|
||||
LLVector3d frame_center_global = !avatarp ?
|
||||
LLVector3d frame_center_global = !isAgentAvatarValid() ?
|
||||
gAgent.getPositionGlobal() :
|
||||
gAgent.getPosGlobalFromAgent(avatarp->mRoot.getWorldPosition());
|
||||
gAgent.getPosGlobalFromAgent(gAgentAvatarp->mRoot.getWorldPosition());
|
||||
|
||||
BOOL isConstrained = FALSE;
|
||||
LLVector3d head_offset;
|
||||
|
|
@ -1789,32 +1778,32 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
|
|||
}// End Ventrella
|
||||
else if (mCameraMode == CAMERA_MODE_MOUSELOOK)
|
||||
{
|
||||
if (!avatarp || avatarp->mDrawable.isNull())
|
||||
if (!isAgentAvatarValid() || gAgentAvatarp->mDrawable.isNull())
|
||||
{
|
||||
llwarns << "Null avatar drawable!" << llendl;
|
||||
return LLVector3d::zero;
|
||||
}
|
||||
head_offset.clearVec();
|
||||
if (avatarp->isSitting() && avatarp->getParent())
|
||||
if (gAgentAvatarp->isSitting() && gAgentAvatarp->getParent())
|
||||
{
|
||||
avatarp->updateHeadOffset();
|
||||
head_offset.mdV[VX] = avatarp->mHeadOffset.mV[VX];
|
||||
head_offset.mdV[VY] = avatarp->mHeadOffset.mV[VY];
|
||||
head_offset.mdV[VZ] = avatarp->mHeadOffset.mV[VZ] + 0.1f;
|
||||
const LLMatrix4& mat = ((LLViewerObject*) avatarp->getParent())->getRenderMatrix();
|
||||
gAgentAvatarp->updateHeadOffset();
|
||||
head_offset.mdV[VX] = gAgentAvatarp->mHeadOffset.mV[VX];
|
||||
head_offset.mdV[VY] = gAgentAvatarp->mHeadOffset.mV[VY];
|
||||
head_offset.mdV[VZ] = gAgentAvatarp->mHeadOffset.mV[VZ] + 0.1f;
|
||||
const LLMatrix4& mat = ((LLViewerObject*) gAgentAvatarp->getParent())->getRenderMatrix();
|
||||
camera_position_global = gAgent.getPosGlobalFromAgent
|
||||
((avatarp->getPosition()+
|
||||
LLVector3(head_offset)*avatarp->getRotation()) * mat);
|
||||
((gAgentAvatarp->getPosition()+
|
||||
LLVector3(head_offset)*gAgentAvatarp->getRotation()) * mat);
|
||||
}
|
||||
else
|
||||
{
|
||||
head_offset.mdV[VZ] = avatarp->mHeadOffset.mV[VZ];
|
||||
if (avatarp->isSitting())
|
||||
head_offset.mdV[VZ] = gAgentAvatarp->mHeadOffset.mV[VZ];
|
||||
if (gAgentAvatarp->isSitting())
|
||||
{
|
||||
head_offset.mdV[VZ] += 0.1;
|
||||
}
|
||||
camera_position_global = gAgent.getPosGlobalFromAgent(avatarp->getRenderPosition());//frame_center_global;
|
||||
head_offset = head_offset * avatarp->getRenderRotation();
|
||||
camera_position_global = gAgent.getPosGlobalFromAgent(gAgentAvatarp->getRenderPosition());//frame_center_global;
|
||||
head_offset = head_offset * gAgentAvatarp->getRenderRotation();
|
||||
camera_position_global = camera_position_global + head_offset;
|
||||
}
|
||||
}
|
||||
|
|
@ -1824,8 +1813,8 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
|
|||
F32 camera_distance = 0.f;
|
||||
|
||||
if (mSitCameraEnabled
|
||||
&& avatarp
|
||||
&& avatarp->isSitting()
|
||||
&& isAgentAvatarValid()
|
||||
&& gAgentAvatarp->isSitting()
|
||||
&& mSitCameraReferenceObject.notNull())
|
||||
{
|
||||
// sit camera
|
||||
|
|
@ -1841,9 +1830,9 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
|
|||
local_camera_offset = mCameraZoomFraction * getCameraOffsetInitial() * gSavedSettings.getF32("CameraOffsetScale");
|
||||
|
||||
// are we sitting down?
|
||||
if (avatarp && avatarp->getParent())
|
||||
if (isAgentAvatarValid() && gAgentAvatarp->getParent())
|
||||
{
|
||||
LLQuaternion parent_rot = ((LLViewerObject*)avatarp->getParent())->getRenderRotation();
|
||||
LLQuaternion parent_rot = ((LLViewerObject*)gAgentAvatarp->getParent())->getRenderRotation();
|
||||
// slam agent coordinate frame to proper parent local version
|
||||
LLVector3 at_axis = gAgent.getFrameAgent().getAtAxis() * parent_rot;
|
||||
at_axis.mV[VZ] = 0.f;
|
||||
|
|
@ -1857,7 +1846,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
|
|||
local_camera_offset = gAgent.getFrameAgent().rotateToAbsolute( local_camera_offset );
|
||||
}
|
||||
|
||||
if (!mCameraCollidePlane.isExactlyZero() && (!avatarp || !avatarp->isSitting()))
|
||||
if (!mCameraCollidePlane.isExactlyZero() && (!isAgentAvatarValid() || !gAgentAvatarp->isSitting()))
|
||||
{
|
||||
LLVector3 plane_normal;
|
||||
plane_normal.setVec(mCameraCollidePlane.mV);
|
||||
|
|
@ -1910,11 +1899,11 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
|
|||
// set the global camera position
|
||||
LLVector3d camera_offset;
|
||||
|
||||
LLVector3 av_pos = !avatarp ? LLVector3::zero : avatarp->getRenderPosition();
|
||||
LLVector3 av_pos = !isAgentAvatarValid() ? LLVector3::zero : gAgentAvatarp->getRenderPosition();
|
||||
camera_offset.setVec( local_camera_offset );
|
||||
camera_position_global = frame_center_global + head_offset + camera_offset;
|
||||
|
||||
if (avatarp)
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
LLVector3d camera_lag_d;
|
||||
F32 lag_interp = LLCriticalDamp::getInterpolant(CAMERA_LAG_HALF_LIFE);
|
||||
|
|
@ -1922,8 +1911,8 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
|
|||
LLVector3 vel = gAgent.getVelocity();
|
||||
|
||||
// lag by appropriate amount for flying
|
||||
F32 time_in_air = avatarp->mTimeInAir.getElapsedTimeF32();
|
||||
if(!mCameraAnimating && avatarp->mInAir && time_in_air > GROUND_TO_AIR_CAMERA_TRANSITION_START_TIME)
|
||||
F32 time_in_air = gAgentAvatarp->mTimeInAir.getElapsedTimeF32();
|
||||
if(!mCameraAnimating && gAgentAvatarp->mInAir && time_in_air > GROUND_TO_AIR_CAMERA_TRANSITION_START_TIME)
|
||||
{
|
||||
LLVector3 frame_at_axis = gAgent.getFrameAgent().getAtAxis();
|
||||
frame_at_axis -= projected_vec(frame_at_axis, gAgent.getReferenceUpVector());
|
||||
|
|
@ -1935,7 +1924,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
|
|||
|
||||
lag_interp *= u;
|
||||
|
||||
if (gViewerWindow->getLeftMouseDown() && gViewerWindow->getLastPick().mObjectID == avatarp->getID())
|
||||
if (gViewerWindow->getLeftMouseDown() && gViewerWindow->getLastPick().mObjectID == gAgentAvatarp->getID())
|
||||
{
|
||||
// disable camera lag when using mouse-directed steering
|
||||
target_lag.clearVec();
|
||||
|
|
@ -2136,8 +2125,6 @@ void LLAgentCamera::changeCameraToMouselook(BOOL animate)
|
|||
return;
|
||||
}
|
||||
|
||||
LLVOAvatarSelf *avatarp = gAgent.getAvatarObject();
|
||||
|
||||
// visibility changes at end of animation
|
||||
gViewerWindow->getWindow()->resetBusyCount();
|
||||
|
||||
|
|
@ -2146,10 +2133,10 @@ void LLAgentCamera::changeCameraToMouselook(BOOL animate)
|
|||
|
||||
LLToolMgr::getInstance()->setCurrentToolset(gMouselookToolset);
|
||||
|
||||
if (avatarp)
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
avatarp->stopMotion(ANIM_AGENT_BODY_NOISE);
|
||||
avatarp->stopMotion(ANIM_AGENT_BREATHE_ROT);
|
||||
gAgentAvatarp->stopMotion(ANIM_AGENT_BODY_NOISE);
|
||||
gAgentAvatarp->stopMotion(ANIM_AGENT_BREATHE_ROT);
|
||||
}
|
||||
|
||||
//gViewerWindow->stopGrab();
|
||||
|
|
@ -2161,7 +2148,7 @@ void LLAgentCamera::changeCameraToMouselook(BOOL animate)
|
|||
{
|
||||
gFocusMgr.setKeyboardFocus(NULL);
|
||||
|
||||
mLastCameraMode = mCameraMode;
|
||||
updateLastCamera();
|
||||
mCameraMode = CAMERA_MODE_MOUSELOOK;
|
||||
const U32 old_flags = gAgent.getControlFlags();
|
||||
gAgent.setControlFlags(AGENT_CONTROL_MOUSELOOK);
|
||||
|
|
@ -2223,7 +2210,7 @@ void LLAgentCamera::changeCameraToFollow(BOOL animate)
|
|||
}
|
||||
startCameraAnimation();
|
||||
|
||||
mLastCameraMode = mCameraMode;
|
||||
updateLastCamera();
|
||||
mCameraMode = CAMERA_MODE_FOLLOW;
|
||||
|
||||
// bang-in the current focus, position, and up vector of the follow cam
|
||||
|
|
@ -2234,12 +2221,11 @@ void LLAgentCamera::changeCameraToFollow(BOOL animate)
|
|||
LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset);
|
||||
}
|
||||
|
||||
LLVOAvatarSelf *avatarp = gAgent.getAvatarObject();
|
||||
if (avatarp)
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
avatarp->mPelvisp->setPosition(LLVector3::zero);
|
||||
avatarp->startMotion( ANIM_AGENT_BODY_NOISE );
|
||||
avatarp->startMotion( ANIM_AGENT_BREATHE_ROT );
|
||||
gAgentAvatarp->mPelvisp->setPosition(LLVector3::zero);
|
||||
gAgentAvatarp->startMotion( ANIM_AGENT_BODY_NOISE );
|
||||
gAgentAvatarp->startMotion( ANIM_AGENT_BREATHE_ROT );
|
||||
}
|
||||
|
||||
// unpause avatar animation
|
||||
|
|
@ -2278,15 +2264,14 @@ void LLAgentCamera::changeCameraToThirdPerson(BOOL animate)
|
|||
|
||||
mCameraZoomFraction = INITIAL_ZOOM_FRACTION;
|
||||
|
||||
LLVOAvatarSelf *avatarp = gAgent.getAvatarObject();
|
||||
if (avatarp)
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
if (!avatarp->isSitting())
|
||||
if (!gAgentAvatarp->isSitting())
|
||||
{
|
||||
avatarp->mPelvisp->setPosition(LLVector3::zero);
|
||||
gAgentAvatarp->mPelvisp->setPosition(LLVector3::zero);
|
||||
}
|
||||
avatarp->startMotion(ANIM_AGENT_BODY_NOISE);
|
||||
avatarp->startMotion(ANIM_AGENT_BREATHE_ROT);
|
||||
gAgentAvatarp->startMotion(ANIM_AGENT_BODY_NOISE);
|
||||
gAgentAvatarp->startMotion(ANIM_AGENT_BREATHE_ROT);
|
||||
}
|
||||
|
||||
LLVector3 at_axis;
|
||||
|
|
@ -2308,7 +2293,7 @@ void LLAgentCamera::changeCameraToThirdPerson(BOOL animate)
|
|||
mTargetCameraDistance = MIN_CAMERA_DISTANCE;
|
||||
animate = FALSE;
|
||||
}
|
||||
mLastCameraMode = mCameraMode;
|
||||
updateLastCamera();
|
||||
mCameraMode = CAMERA_MODE_THIRD_PERSON;
|
||||
const U32 old_flags = gAgent.getControlFlags();
|
||||
gAgent.clearControlFlags(AGENT_CONTROL_MOUSELOOK);
|
||||
|
|
@ -2320,9 +2305,9 @@ void LLAgentCamera::changeCameraToThirdPerson(BOOL animate)
|
|||
}
|
||||
|
||||
// Remove any pitch from the avatar
|
||||
if (avatarp && avatarp->getParent())
|
||||
if (isAgentAvatarValid() && gAgentAvatarp->getParent())
|
||||
{
|
||||
LLQuaternion obj_rot = ((LLViewerObject*)avatarp->getParent())->getRenderRotation();
|
||||
LLQuaternion obj_rot = ((LLViewerObject*)gAgentAvatarp->getParent())->getRenderRotation();
|
||||
at_axis = LLViewerCamera::getInstance()->getAtAxis();
|
||||
at_axis.mV[VZ] = 0.f;
|
||||
at_axis.normalize();
|
||||
|
|
@ -2379,7 +2364,7 @@ void LLAgentCamera::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL came
|
|||
|
||||
if (mCameraMode != CAMERA_MODE_CUSTOMIZE_AVATAR)
|
||||
{
|
||||
mLastCameraMode = mCameraMode;
|
||||
updateLastCamera();
|
||||
mCameraMode = CAMERA_MODE_CUSTOMIZE_AVATAR;
|
||||
const U32 old_flags = gAgent.getControlFlags();
|
||||
gAgent.clearControlFlags(AGENT_CONTROL_MOUSELOOK);
|
||||
|
|
@ -2394,8 +2379,7 @@ void LLAgentCamera::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL came
|
|||
LLVOAvatarSelf::onCustomizeStart();
|
||||
}
|
||||
|
||||
LLVOAvatarSelf *avatarp = gAgent.getAvatarObject();
|
||||
if (avatarp)
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
if(avatar_animate)
|
||||
{
|
||||
|
|
@ -2407,8 +2391,8 @@ void LLAgentCamera::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL came
|
|||
|
||||
gAgent.sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_START);
|
||||
gAgent.setCustomAnim(TRUE);
|
||||
avatarp->startMotion(ANIM_AGENT_CUSTOMIZE);
|
||||
LLMotion* turn_motion = avatarp->findMotion(ANIM_AGENT_CUSTOMIZE);
|
||||
gAgentAvatarp->startMotion(ANIM_AGENT_CUSTOMIZE);
|
||||
LLMotion* turn_motion = gAgentAvatarp->findMotion(ANIM_AGENT_CUSTOMIZE);
|
||||
|
||||
if (turn_motion)
|
||||
{
|
||||
|
|
@ -2511,16 +2495,15 @@ void LLAgentCamera::setFocusGlobal(const LLVector3d& focus, const LLUUID &object
|
|||
setFocusObject(gObjectList.findObject(object_id));
|
||||
LLVector3d old_focus = mFocusTargetGlobal;
|
||||
LLViewerObject *focus_obj = mFocusObject;
|
||||
LLVOAvatarSelf *avatarp = gAgent.getAvatarObject();
|
||||
|
||||
// if focus has changed
|
||||
if (old_focus != focus)
|
||||
{
|
||||
if (focus.isExactlyZero())
|
||||
{
|
||||
if (avatarp)
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
mFocusTargetGlobal = gAgent.getPosGlobalFromAgent(avatarp->mHeadp->getWorldPosition());
|
||||
mFocusTargetGlobal = gAgent.getPosGlobalFromAgent(gAgentAvatarp->mHeadp->getWorldPosition());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2563,9 +2546,9 @@ void LLAgentCamera::setFocusGlobal(const LLVector3d& focus, const LLUUID &object
|
|||
{
|
||||
if (focus.isExactlyZero())
|
||||
{
|
||||
if (avatarp)
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
mFocusTargetGlobal = gAgent.getPosGlobalFromAgent(avatarp->mHeadp->getWorldPosition());
|
||||
mFocusTargetGlobal = gAgent.getPosGlobalFromAgent(gAgentAvatarp->mHeadp->getWorldPosition());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2702,10 +2685,9 @@ void LLAgentCamera::setFocusOnAvatar(BOOL focus_on_avatar, BOOL animate)
|
|||
if (mCameraMode == CAMERA_MODE_THIRD_PERSON)
|
||||
{
|
||||
LLVector3 at_axis;
|
||||
LLVOAvatarSelf *avatarp = gAgent.getAvatarObject();
|
||||
if (avatarp && avatarp->getParent())
|
||||
if (isAgentAvatarValid() && gAgentAvatarp->getParent())
|
||||
{
|
||||
LLQuaternion obj_rot = ((LLViewerObject*)avatarp->getParent())->getRenderRotation();
|
||||
LLQuaternion obj_rot = ((LLViewerObject*)gAgentAvatarp->getParent())->getRenderRotation();
|
||||
at_axis = LLViewerCamera::getInstance()->getAtAxis();
|
||||
at_axis.mV[VZ] = 0.f;
|
||||
at_axis.normalize();
|
||||
|
|
@ -2733,16 +2715,15 @@ void LLAgentCamera::setFocusOnAvatar(BOOL focus_on_avatar, BOOL animate)
|
|||
|
||||
BOOL LLAgentCamera::setLookAt(ELookAtType target_type, LLViewerObject *object, LLVector3 position)
|
||||
{
|
||||
LLVOAvatarSelf *avatarp = gAgent.getAvatarObject();
|
||||
if(object && object->isAttachment())
|
||||
{
|
||||
LLViewerObject* parent = object;
|
||||
while(parent)
|
||||
{
|
||||
if (parent == avatarp)
|
||||
if (parent == gAgentAvatarp)
|
||||
{
|
||||
// looking at an attachment on ourselves, which we don't want to do
|
||||
object = avatarp;
|
||||
object = gAgentAvatarp;
|
||||
position.clearVec();
|
||||
}
|
||||
parent = (LLViewerObject*)parent->getParent();
|
||||
|
|
@ -2751,7 +2732,7 @@ BOOL LLAgentCamera::setLookAt(ELookAtType target_type, LLViewerObject *object, L
|
|||
if(!mLookAt || mLookAt->isDead())
|
||||
{
|
||||
mLookAt = (LLHUDEffectLookAt *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_LOOKAT);
|
||||
mLookAt->setSourceObject(avatarp);
|
||||
mLookAt->setSourceObject(gAgentAvatarp);
|
||||
}
|
||||
|
||||
return mLookAt->setLookAt(target_type, object, position);
|
||||
|
|
@ -2774,14 +2755,13 @@ void LLAgentCamera::lookAtLastChat()
|
|||
return;
|
||||
}
|
||||
|
||||
LLVOAvatarSelf *avatarp = gAgent.getAvatarObject();
|
||||
LLVector3 delta_pos;
|
||||
if (chatter->isAvatar())
|
||||
{
|
||||
LLVOAvatar *chatter_av = (LLVOAvatar*)chatter;
|
||||
if (avatarp && chatter_av->mHeadp)
|
||||
if (isAgentAvatarValid() && chatter_av->mHeadp)
|
||||
{
|
||||
delta_pos = chatter_av->mHeadp->getWorldPosition() - avatarp->mHeadp->getWorldPosition();
|
||||
delta_pos = chatter_av->mHeadp->getWorldPosition() - gAgentAvatarp->mHeadp->getWorldPosition();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2793,7 +2773,7 @@ void LLAgentCamera::lookAtLastChat()
|
|||
|
||||
changeCameraToThirdPerson();
|
||||
|
||||
LLVector3 new_camera_pos = avatarp->mHeadp->getWorldPosition();
|
||||
LLVector3 new_camera_pos = gAgentAvatarp->mHeadp->getWorldPosition();
|
||||
LLVector3 left = delta_pos % LLVector3::z_axis;
|
||||
left.normalize();
|
||||
LLVector3 up = left % delta_pos;
|
||||
|
|
@ -2822,7 +2802,7 @@ void LLAgentCamera::lookAtLastChat()
|
|||
|
||||
changeCameraToThirdPerson();
|
||||
|
||||
LLVector3 new_camera_pos = avatarp->mHeadp->getWorldPosition();
|
||||
LLVector3 new_camera_pos = gAgentAvatarp->mHeadp->getWorldPosition();
|
||||
LLVector3 left = delta_pos % LLVector3::z_axis;
|
||||
left.normalize();
|
||||
LLVector3 up = left % delta_pos;
|
||||
|
|
@ -2847,8 +2827,7 @@ BOOL LLAgentCamera::setPointAt(EPointAtType target_type, LLViewerObject *object,
|
|||
if (!mPointAt || mPointAt->isDead())
|
||||
{
|
||||
mPointAt = (LLHUDEffectPointAt *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINTAT);
|
||||
LLVOAvatarSelf *avatarp = gAgent.getAvatarObject();
|
||||
mPointAt->setSourceObject(avatarp);
|
||||
mPointAt->setSourceObject(gAgentAvatarp);
|
||||
}
|
||||
return mPointAt->setPointAt(target_type, object, position);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,8 +92,6 @@ class LLAgentCamera
|
|||
LOG_CLASS(LLAgentCamera);
|
||||
|
||||
public:
|
||||
friend class LLAgent;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Constructors / Destructors
|
||||
//--------------------------------------------------------------------
|
||||
|
|
@ -121,8 +119,11 @@ public:
|
|||
BOOL cameraCustomizeAvatar() const { return (mCameraMode == CAMERA_MODE_CUSTOMIZE_AVATAR /*&& !mCameraAnimating*/); }
|
||||
BOOL cameraFollow() const { return (mCameraMode == CAMERA_MODE_FOLLOW && mLastCameraMode == CAMERA_MODE_FOLLOW); }
|
||||
ECameraMode getCameraMode() const { return mCameraMode; }
|
||||
ECameraMode getLastCameraMode() const { return mLastCameraMode; }
|
||||
void updateCamera(); // Call once per frame to update camera location/orientation
|
||||
void resetCamera(); // Slam camera into its default position
|
||||
void updateLastCamera(); // Set last camera to current camera
|
||||
|
||||
private:
|
||||
ECameraMode mCameraMode; // Target mode after transition animation is done
|
||||
ECameraMode mLastCameraMode;
|
||||
|
|
@ -157,6 +158,7 @@ public:
|
|||
BOOL calcCameraMinDistance(F32 &obj_min_distance);
|
||||
F32 calcCustomizeAvatarUIOffset(const LLVector3d& camera_pos_global);
|
||||
F32 getCurrentCameraBuildOffset() { return (F32)mCameraFocusOffset.length(); }
|
||||
void clearCameraLag() { mCameraLag.clearVec(); }
|
||||
private:
|
||||
F32 mCurrentCameraDistance; // Current camera offset from avatar
|
||||
F32 mTargetCameraDistance; // Target camera offset from avatar
|
||||
|
|
|
|||
|
|
@ -49,12 +49,10 @@
|
|||
void LLAgentUI::buildName(std::string& name)
|
||||
{
|
||||
name.clear();
|
||||
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
if (avatarp)
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
LLNameValue *first_nv = avatarp->getNVPair("FirstName");
|
||||
LLNameValue *last_nv = avatarp->getNVPair("LastName");
|
||||
LLNameValue *first_nv = gAgentAvatarp->getNVPair("FirstName");
|
||||
LLNameValue *last_nv = gAgentAvatarp->getNVPair("LastName");
|
||||
if (first_nv && last_nv)
|
||||
{
|
||||
name = first_nv->printData() + " " + last_nv->printData();
|
||||
|
|
@ -73,7 +71,8 @@ void LLAgentUI::buildName(std::string& name)
|
|||
//static
|
||||
void LLAgentUI::buildFullname(std::string& name)
|
||||
{
|
||||
if (gAgent.getAvatarObject()) name = gAgent.getAvatarObject()->getFullname();
|
||||
if (isAgentAvatarValid())
|
||||
name = gAgentAvatarp->getFullname();
|
||||
}
|
||||
|
||||
//static
|
||||
|
|
|
|||
|
|
@ -56,8 +56,6 @@
|
|||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
#define USE_CURRENT_OUTFIT_FOLDER
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Classes for fetching initial wearables data
|
||||
//--------------------------------------------------------------------
|
||||
|
|
@ -120,9 +118,8 @@ protected:
|
|||
void importedFolderDone(void);
|
||||
void contentsDone(void);
|
||||
enum ELibraryOutfitFetchStep mCurrFetchStep;
|
||||
typedef std::vector<LLUUID> clothing_folder_vec_t;
|
||||
clothing_folder_vec_t mLibraryClothingFolders;
|
||||
clothing_folder_vec_t mImportedClothingFolders;
|
||||
uuid_vec_t mLibraryClothingFolders;
|
||||
uuid_vec_t mImportedClothingFolders;
|
||||
bool mOutfitsPopulated;
|
||||
LLUUID mClothingID;
|
||||
LLUUID mLibraryClothingID;
|
||||
|
|
@ -291,7 +288,7 @@ void LLAgentWearables::addWearableToAgentInventoryCallback::fire(const LLUUID& i
|
|||
}
|
||||
if (mTodo & CALL_RECOVERDONE)
|
||||
{
|
||||
LLAppearanceManager::instance().addCOFItemLink(inv_item,false);
|
||||
LLAppearanceMgr::instance().addCOFItemLink(inv_item,false);
|
||||
gAgentWearables.recoverMissingWearableDone();
|
||||
}
|
||||
/*
|
||||
|
|
@ -299,7 +296,7 @@ void LLAgentWearables::addWearableToAgentInventoryCallback::fire(const LLUUID& i
|
|||
*/
|
||||
if (mTodo & CALL_CREATESTANDARDDONE)
|
||||
{
|
||||
LLAppearanceManager::instance().addCOFItemLink(inv_item,false);
|
||||
LLAppearanceMgr::instance().addCOFItemLink(inv_item,false);
|
||||
gAgentWearables.createStandardWearablesDone(mType, mIndex);
|
||||
}
|
||||
if (mTodo & CALL_MAKENEWOUTFITDONE)
|
||||
|
|
@ -308,7 +305,7 @@ void LLAgentWearables::addWearableToAgentInventoryCallback::fire(const LLUUID& i
|
|||
}
|
||||
if (mTodo & CALL_WEARITEM)
|
||||
{
|
||||
LLAppearanceManager::instance().addCOFItemLink(inv_item, true);
|
||||
LLAppearanceMgr::instance().addCOFItemLink(inv_item, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -485,7 +482,7 @@ void LLAgentWearables::saveWearable(const EWearableType type, const U32 index, B
|
|||
return;
|
||||
}
|
||||
|
||||
gAgent.getAvatarObject()->wearableUpdated( type, TRUE );
|
||||
gAgentAvatarp->wearableUpdated( type, TRUE );
|
||||
|
||||
if (send_update)
|
||||
{
|
||||
|
|
@ -783,8 +780,7 @@ U32 LLAgentWearables::pushWearable(const EWearableType type, LLWearable *wearabl
|
|||
|
||||
void LLAgentWearables::wearableUpdated(LLWearable *wearable)
|
||||
{
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
avatarp->wearableUpdated(wearable->getType(), TRUE);
|
||||
gAgentAvatarp->wearableUpdated(wearable->getType(), TRUE);
|
||||
wearable->refreshName();
|
||||
wearable->setLabelUpdated();
|
||||
|
||||
|
|
@ -825,11 +821,10 @@ void LLAgentWearables::popWearable(LLWearable *wearable)
|
|||
void LLAgentWearables::popWearable(const EWearableType type, U32 index)
|
||||
{
|
||||
LLWearable *wearable = getWearable(type, index);
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
if (wearable)
|
||||
{
|
||||
mWearableDatas[type].erase(mWearableDatas[type].begin() + index);
|
||||
avatarp->wearableUpdated(wearable->getType(), TRUE);
|
||||
gAgentAvatarp->wearableUpdated(wearable->getType(), TRUE);
|
||||
wearable->setLabelUpdated();
|
||||
}
|
||||
}
|
||||
|
|
@ -961,8 +956,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
|
|||
LLUUID agent_id;
|
||||
gMessageSystem->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id);
|
||||
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
if (avatarp && (agent_id == avatarp->getID()))
|
||||
if (isAgentAvatarValid() && (agent_id == gAgentAvatarp->getID()))
|
||||
{
|
||||
gMessageSystem->getU32Fast(_PREHASH_AgentData, _PREHASH_SerialNum, gAgentQueryManager.mUpdateSerialNum);
|
||||
|
||||
|
|
@ -1028,7 +1022,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
|
|||
|
||||
// Get the complete information on the items in the inventory and set up an observer
|
||||
// that will trigger when the complete information is fetched.
|
||||
LLInventoryFetchDescendentsObserver::folder_ref_t folders;
|
||||
uuid_vec_t folders;
|
||||
folders.push_back(current_outfit_id);
|
||||
outfit->fetchDescendents(folders);
|
||||
if(outfit->isEverythingComplete())
|
||||
|
|
@ -1046,64 +1040,6 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
|
|||
}
|
||||
}
|
||||
|
||||
// A single wearable that the avatar was wearing on start-up has arrived from the database.
|
||||
// static
|
||||
void LLAgentWearables::onInitialWearableAssetArrived(LLWearable* wearable, void* userdata)
|
||||
{
|
||||
boost::scoped_ptr<LLInitialWearablesFetch::InitialWearableData> wear_data((LLInitialWearablesFetch::InitialWearableData*)userdata);
|
||||
const EWearableType type = wear_data->mType;
|
||||
U32 index = 0;
|
||||
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
if (!avatarp)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (wearable)
|
||||
{
|
||||
llassert(type == wearable->getType());
|
||||
wearable->setItemID(wear_data->mItemID);
|
||||
index = gAgentWearables.pushWearable(type, wearable);
|
||||
gAgentWearables.mItemsAwaitingWearableUpdate.erase(wear_data->mItemID);
|
||||
|
||||
// disable composites if initial textures are baked
|
||||
avatarp->setupComposites();
|
||||
|
||||
avatarp->setCompositeUpdatesEnabled(TRUE);
|
||||
gInventory.addChangedMask(LLInventoryObserver::LABEL, wearable->getItemID());
|
||||
}
|
||||
else
|
||||
{
|
||||
// Somehow the asset doesn't exist in the database.
|
||||
gAgentWearables.recoverMissingWearable(type,index);
|
||||
}
|
||||
|
||||
|
||||
gInventory.notifyObservers();
|
||||
|
||||
// Have all the wearables that the avatar was wearing at log-in arrived?
|
||||
// MULTI-WEARABLE: update when multiple wearables can arrive per type.
|
||||
|
||||
gAgentWearables.updateWearablesLoaded();
|
||||
if (gAgentWearables.areWearablesLoaded())
|
||||
{
|
||||
|
||||
// Can't query cache until all wearables have arrived, so calling this earlier is a no-op.
|
||||
gAgentWearables.queryWearableCache();
|
||||
|
||||
// Make sure that the server's idea of the avatar's wearables actually match the wearables.
|
||||
gAgent.sendAgentSetAppearance();
|
||||
|
||||
// Check to see if there are any baked textures that we hadn't uploaded before we logged off last time.
|
||||
// If there are any, schedule them to be uploaded as soon as the layer textures they depend on arrive.
|
||||
if (gAgentCamera.cameraCustomizeAvatar())
|
||||
{
|
||||
avatarp->requestLayerSetUploads();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Normally, all wearables referred to "AgentWearablesUpdate" will correspond to actual assets in the
|
||||
// database. If for some reason, we can't load one of those assets, we can try to reconstruct it so that
|
||||
// the user isn't left without a shape, for example. (We can do that only after the inventory has loaded.)
|
||||
|
|
@ -1179,7 +1115,7 @@ public:
|
|||
{
|
||||
llinfos << "All items created" << llendl;
|
||||
LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy;
|
||||
LLAppearanceManager::instance().linkAll(LLAppearanceManager::instance().getCOF(),
|
||||
LLAppearanceMgr::instance().linkAll(LLAppearanceMgr::instance().getCOF(),
|
||||
mItemsToLink,
|
||||
link_waiter);
|
||||
}
|
||||
|
|
@ -1239,13 +1175,9 @@ void LLAgentWearables::createStandardWearables(BOOL female)
|
|||
llwarns << "Creating Standard " << (female ? "female" : "male")
|
||||
<< " Wearables" << llendl;
|
||||
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
if (!avatarp)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!isAgentAvatarValid()) return;
|
||||
|
||||
avatarp->setSex(female ? SEX_FEMALE : SEX_MALE);
|
||||
gAgentAvatarp->setSex(female ? SEX_FEMALE : SEX_MALE);
|
||||
|
||||
const BOOL create[WT_COUNT] =
|
||||
{
|
||||
|
|
@ -1293,11 +1225,8 @@ void LLAgentWearables::createStandardWearablesDone(S32 type, U32 index)
|
|||
{
|
||||
llinfos << "type " << type << " index " << index << llendl;
|
||||
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
if (avatarp)
|
||||
{
|
||||
avatarp->updateVisualParams();
|
||||
}
|
||||
if (!isAgentAvatarValid()) return;
|
||||
gAgentAvatarp->updateVisualParams();
|
||||
}
|
||||
|
||||
void LLAgentWearables::createStandardWearablesAllDone()
|
||||
|
|
@ -1312,8 +1241,7 @@ void LLAgentWearables::createStandardWearablesAllDone()
|
|||
updateServer();
|
||||
|
||||
// Treat this as the first texture entry message, if none received yet
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
avatarp->onFirstTEMessageReceived();
|
||||
gAgentAvatarp->onFirstTEMessageReceived();
|
||||
}
|
||||
|
||||
// MULTI-WEARABLE: Properly handle multiwearables later.
|
||||
|
|
@ -1335,11 +1263,7 @@ void LLAgentWearables::makeNewOutfit(const std::string& new_folder_name,
|
|||
const LLDynamicArray<S32>& attachments_to_include,
|
||||
BOOL rename_clothing)
|
||||
{
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
if (!avatarp)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!isAgentAvatarValid()) return;
|
||||
|
||||
// First, make a folder in the Clothes directory.
|
||||
LLUUID folder_id = gInventory.createNewCategory(
|
||||
|
|
@ -1437,7 +1361,7 @@ void LLAgentWearables::makeNewOutfit(const std::string& new_folder_name,
|
|||
for (S32 i = 0; i < attachments_to_include.count(); i++)
|
||||
{
|
||||
S32 attachment_pt = attachments_to_include[i];
|
||||
LLViewerJointAttachment* attachment = get_if_there(avatarp->mAttachmentPoints, attachment_pt, (LLViewerJointAttachment*)NULL);
|
||||
LLViewerJointAttachment* attachment = get_if_there(gAgentAvatarp->mAttachmentPoints, attachment_pt, (LLViewerJointAttachment*)NULL);
|
||||
if (!attachment) continue;
|
||||
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
|
||||
attachment_iter != attachment->mAttachedObjects.end();
|
||||
|
|
@ -1498,8 +1422,8 @@ public:
|
|||
tab_outfits->changeOpenClose(tab_outfits->getDisplayChildren());
|
||||
}
|
||||
|
||||
LLAppearanceManager::instance().updateIsDirty();
|
||||
LLAppearanceManager::instance().updatePanelOutfitName("");
|
||||
LLAppearanceMgr::instance().updateIsDirty();
|
||||
LLAppearanceMgr::instance().updatePanelOutfitName("");
|
||||
}
|
||||
|
||||
virtual void fire(const LLUUID&)
|
||||
|
|
@ -1512,11 +1436,7 @@ private:
|
|||
|
||||
LLUUID LLAgentWearables::makeNewOutfitLinks(const std::string& new_folder_name)
|
||||
{
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
if (!avatarp)
|
||||
{
|
||||
return LLUUID::null;
|
||||
}
|
||||
if (!isAgentAvatarValid()) return LLUUID::null;
|
||||
|
||||
// First, make a folder in the My Outfits directory.
|
||||
const LLUUID parent_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
|
||||
|
|
@ -1526,8 +1446,8 @@ LLUUID LLAgentWearables::makeNewOutfitLinks(const std::string& new_folder_name)
|
|||
new_folder_name);
|
||||
|
||||
LLPointer<LLInventoryCallback> cb = new LLShowCreatedOutfit(folder_id);
|
||||
LLAppearanceManager::instance().shallowCopyCategoryContents(LLAppearanceManager::instance().getCOF(),folder_id, cb);
|
||||
LLAppearanceManager::instance().createBaseOutfitLink(folder_id, cb);
|
||||
LLAppearanceMgr::instance().shallowCopyCategoryContents(LLAppearanceMgr::instance().getCOF(),folder_id, cb);
|
||||
LLAppearanceMgr::instance().createBaseOutfitLink(folder_id, cb);
|
||||
|
||||
return folder_id;
|
||||
}
|
||||
|
|
@ -1680,7 +1600,6 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
|
|||
BOOL remove)
|
||||
{
|
||||
llinfos << "setWearableOutfit() start" << llendl;
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
|
||||
BOOL wearables_to_remove[WT_COUNT];
|
||||
wearables_to_remove[WT_SHAPE] = FALSE;
|
||||
|
|
@ -1784,11 +1703,11 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
|
|||
}
|
||||
}
|
||||
|
||||
if (avatarp)
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
avatarp->setCompositeUpdatesEnabled(TRUE);
|
||||
avatarp->updateVisualParams();
|
||||
avatarp->invalidateAll();
|
||||
gAgentAvatarp->setCompositeUpdatesEnabled(TRUE);
|
||||
gAgentAvatarp->updateVisualParams();
|
||||
gAgentAvatarp->invalidateAll();
|
||||
}
|
||||
|
||||
// Start rendering & update the server
|
||||
|
|
@ -2038,12 +1957,7 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj
|
|||
// already wearing and in request set -> leave alone.
|
||||
// not wearing and in request set -> put on.
|
||||
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
if (!avatarp)
|
||||
{
|
||||
llwarns << "No avatar found." << llendl;
|
||||
return;
|
||||
}
|
||||
if (!isAgentAvatarValid()) return;
|
||||
|
||||
std::set<LLUUID> requested_item_ids;
|
||||
std::set<LLUUID> current_item_ids;
|
||||
|
|
@ -2052,8 +1966,8 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj
|
|||
|
||||
// Build up list of objects to be removed and items currently attached.
|
||||
llvo_vec_t objects_to_remove;
|
||||
for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin();
|
||||
iter != avatarp->mAttachmentPoints.end();)
|
||||
for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin();
|
||||
iter != gAgentAvatarp->mAttachmentPoints.end();)
|
||||
{
|
||||
LLVOAvatar::attachment_map_t::iterator curiter = iter++;
|
||||
LLViewerJointAttachment* attachment = curiter->second;
|
||||
|
|
@ -2109,12 +2023,7 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj
|
|||
|
||||
void LLAgentWearables::userRemoveMultipleAttachments(llvo_vec_t& objects_to_remove)
|
||||
{
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
if (!avatarp)
|
||||
{
|
||||
llwarns << "No avatar found." << llendl;
|
||||
return;
|
||||
}
|
||||
if (!isAgentAvatarValid()) return;
|
||||
|
||||
if (objects_to_remove.empty())
|
||||
return;
|
||||
|
|
@ -2137,17 +2046,12 @@ void LLAgentWearables::userRemoveMultipleAttachments(llvo_vec_t& objects_to_remo
|
|||
|
||||
void LLAgentWearables::userRemoveAllAttachments()
|
||||
{
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
if (!avatarp)
|
||||
{
|
||||
llwarns << "No avatar found." << llendl;
|
||||
return;
|
||||
}
|
||||
if (!isAgentAvatarValid()) return;
|
||||
|
||||
llvo_vec_t objects_to_remove;
|
||||
|
||||
for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin();
|
||||
iter != avatarp->mAttachmentPoints.end();)
|
||||
for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin();
|
||||
iter != gAgentAvatarp->mAttachmentPoints.end();)
|
||||
{
|
||||
LLVOAvatar::attachment_map_t::iterator curiter = iter++;
|
||||
LLViewerJointAttachment* attachment = curiter->second;
|
||||
|
|
@ -2274,7 +2178,7 @@ void LLAgentWearables::populateMyOutfitsFolder(void)
|
|||
|
||||
// Get the complete information on the items in the inventory and
|
||||
// setup an observer that will wait for that to happen.
|
||||
LLInventoryFetchDescendentsObserver::folder_ref_t folders;
|
||||
uuid_vec_t folders;
|
||||
outfits->mMyOutfitsID = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
|
||||
|
||||
folders.push_back(outfits->mMyOutfitsID);
|
||||
|
|
@ -2365,7 +2269,7 @@ void LLLibraryOutfitsFetch::folderDone(void)
|
|||
mCompleteFolders.clear();
|
||||
|
||||
// Get the complete information on the items in the inventory.
|
||||
LLInventoryFetchDescendentsObserver::folder_ref_t folders;
|
||||
uuid_vec_t folders;
|
||||
folders.push_back(mClothingID);
|
||||
folders.push_back(mLibraryClothingID);
|
||||
fetchDescendents(folders);
|
||||
|
|
@ -2379,7 +2283,7 @@ void LLLibraryOutfitsFetch::outfitsDone(void)
|
|||
{
|
||||
LLInventoryModel::cat_array_t cat_array;
|
||||
LLInventoryModel::item_array_t wearable_array;
|
||||
LLInventoryFetchDescendentsObserver::folder_ref_t folders;
|
||||
uuid_vec_t folders;
|
||||
|
||||
// Collect the contents of the Library's Clothing folder
|
||||
gInventory.collectDescendents(mLibraryClothingID, cat_array, wearable_array,
|
||||
|
|
@ -2469,7 +2373,7 @@ void LLLibraryOutfitsFetch::libraryDone(void)
|
|||
LLFolderType::FT_NONE,
|
||||
mImportedClothingName);
|
||||
// Copy each folder from library into clothing unless it already exists.
|
||||
for (clothing_folder_vec_t::const_iterator iter = mLibraryClothingFolders.begin();
|
||||
for (uuid_vec_t::const_iterator iter = mLibraryClothingFolders.begin();
|
||||
iter != mLibraryClothingFolders.end();
|
||||
++iter)
|
||||
{
|
||||
|
|
@ -2481,7 +2385,7 @@ void LLLibraryOutfitsFetch::libraryDone(void)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!LLAppearanceManager::getInstance()->getCanMakeFolderIntoOutfit(src_folder_id))
|
||||
if (!LLAppearanceMgr::getInstance()->getCanMakeFolderIntoOutfit(src_folder_id))
|
||||
{
|
||||
llinfos << "Skipping non-outfit folder name:" << cat->getName() << llendl;
|
||||
continue;
|
||||
|
|
@ -2503,14 +2407,14 @@ void LLLibraryOutfitsFetch::libraryDone(void)
|
|||
LLUUID dst_folder_id = gInventory.createNewCategory(mImportedClothingID,
|
||||
LLFolderType::FT_NONE,
|
||||
cat->getName());
|
||||
LLAppearanceManager::getInstance()->shallowCopyCategoryContents(src_folder_id, dst_folder_id, copy_waiter);
|
||||
LLAppearanceMgr::getInstance()->shallowCopyCategoryContents(src_folder_id, dst_folder_id, copy_waiter);
|
||||
}
|
||||
}
|
||||
|
||||
void LLLibraryOutfitsFetch::importedFolderFetch(void)
|
||||
{
|
||||
// Fetch the contents of the Imported Clothing Folder
|
||||
LLInventoryFetchDescendentsObserver::folder_ref_t folders;
|
||||
uuid_vec_t folders;
|
||||
folders.push_back(mImportedClothingID);
|
||||
|
||||
mCompleteFolders.clear();
|
||||
|
|
@ -2526,7 +2430,7 @@ void LLLibraryOutfitsFetch::importedFolderDone(void)
|
|||
{
|
||||
LLInventoryModel::cat_array_t cat_array;
|
||||
LLInventoryModel::item_array_t wearable_array;
|
||||
LLInventoryFetchDescendentsObserver::folder_ref_t folders;
|
||||
uuid_vec_t folders;
|
||||
|
||||
// Collect the contents of the Imported Clothing folder
|
||||
gInventory.collectDescendents(mImportedClothingID, cat_array, wearable_array,
|
||||
|
|
@ -2556,7 +2460,7 @@ void LLLibraryOutfitsFetch::contentsDone(void)
|
|||
LLInventoryModel::cat_array_t cat_array;
|
||||
LLInventoryModel::item_array_t wearable_array;
|
||||
|
||||
for (clothing_folder_vec_t::const_iterator folder_iter = mImportedClothingFolders.begin();
|
||||
for (uuid_vec_t::const_iterator folder_iter = mImportedClothingFolders.begin();
|
||||
folder_iter != mImportedClothingFolders.end();
|
||||
++folder_iter)
|
||||
{
|
||||
|
|
@ -2625,15 +2529,15 @@ void LLInitialWearablesFetch::processContents()
|
|||
gInventory.collectDescendentsIf(mCompleteFolders.front(), cat_array, wearable_array,
|
||||
LLInventoryModel::EXCLUDE_TRASH, is_wearable);
|
||||
|
||||
LLAppearanceManager::instance().setAttachmentInvLinkEnable(true);
|
||||
LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true);
|
||||
if (wearable_array.count() > 0)
|
||||
{
|
||||
LLAppearanceManager::instance().updateAppearanceFromCOF();
|
||||
LLAppearanceMgr::instance().updateAppearanceFromCOF();
|
||||
}
|
||||
else
|
||||
{
|
||||
// if we're constructing the COF from the wearables message, we don't have a proper outfit link
|
||||
LLAppearanceManager::instance().setOutfitDirty(true);
|
||||
LLAppearanceMgr::instance().setOutfitDirty(true);
|
||||
processWearablesMessage();
|
||||
}
|
||||
delete this;
|
||||
|
|
@ -2670,7 +2574,7 @@ public:
|
|||
|
||||
link_inventory_item(gAgent.getID(),
|
||||
item->getLinkedUUID(),
|
||||
LLAppearanceManager::instance().getCOF(),
|
||||
LLAppearanceMgr::instance().getCOF(),
|
||||
item->getName(),
|
||||
LLAssetType::AT_LINK,
|
||||
link_waiter);
|
||||
|
|
@ -2684,7 +2588,7 @@ void LLInitialWearablesFetch::processWearablesMessage()
|
|||
{
|
||||
if (!mAgentInitialWearables.empty()) // We have an empty current outfit folder, use the message data instead.
|
||||
{
|
||||
const LLUUID current_outfit_id = LLAppearanceManager::instance().getCOF();
|
||||
const LLUUID current_outfit_id = LLAppearanceMgr::instance().getCOF();
|
||||
LLInventoryFetchObserver::item_ref_t ids;
|
||||
for (U8 i = 0; i < mAgentInitialWearables.size(); ++i)
|
||||
{
|
||||
|
|
@ -2693,16 +2597,7 @@ void LLInitialWearablesFetch::processWearablesMessage()
|
|||
|
||||
if (wearable_data->mAssetID.notNull())
|
||||
{
|
||||
#ifdef USE_CURRENT_OUTFIT_FOLDER
|
||||
ids.push_back(wearable_data->mItemID);
|
||||
#endif
|
||||
#if 0
|
||||
// // Fetch the wearables
|
||||
// LLWearableList::instance().getAsset(wearable_data->mAssetID,
|
||||
// LLStringUtil::null,
|
||||
// LLWearableDictionary::getAssetType(wearable_data->mType),
|
||||
// LLAgentWearables::onInitialWearableAssetArrived, (void*)(wearable_data));
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2713,11 +2608,10 @@ void LLInitialWearablesFetch::processWearablesMessage()
|
|||
}
|
||||
|
||||
// Add all current attachments to the requested items as well.
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
if(avatarp)
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
for (LLVOAvatar::attachment_map_t::const_iterator iter = avatarp->mAttachmentPoints.begin();
|
||||
iter != avatarp->mAttachmentPoints.end(); ++iter)
|
||||
for (LLVOAvatar::attachment_map_t::const_iterator iter = gAgentAvatarp->mAttachmentPoints.begin();
|
||||
iter != gAgentAvatarp->mAttachmentPoints.end(); ++iter)
|
||||
{
|
||||
LLViewerJointAttachment* attachment = iter->second;
|
||||
if (!attachment) continue;
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ protected:
|
|||
// If the inventory callback manager goes away, we're shutting down, no longer want the callback.
|
||||
if( LLInventoryCallbackManager::is_instantiated() )
|
||||
{
|
||||
LLAppearanceManager::instance().wearInventoryCategoryOnAvatar(gInventory.getCategory(mCatID), mAppend);
|
||||
LLAppearanceMgr::instance().wearInventoryCategoryOnAvatar(gInventory.getCategory(mCatID), mAppend);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -228,7 +228,7 @@ void LLOutfitObserver::doWearCategory()
|
|||
else
|
||||
{
|
||||
// Wear the inventory category.
|
||||
LLAppearanceManager::instance().wearInventoryCategoryOnAvatar(gInventory.getCategory(mCatID), mAppend);
|
||||
LLAppearanceMgr::instance().wearInventoryCategoryOnAvatar(gInventory.getCategory(mCatID), mAppend);
|
||||
}
|
||||
delete this;
|
||||
}
|
||||
|
|
@ -312,7 +312,7 @@ LLUpdateAppearanceOnDestroy::~LLUpdateAppearanceOnDestroy()
|
|||
|
||||
if (!LLApp::isExiting())
|
||||
{
|
||||
LLAppearanceManager::instance().updateAppearanceFromCOF();
|
||||
LLAppearanceMgr::instance().updateAppearanceFromCOF();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -368,6 +368,7 @@ public:
|
|||
void recoverMissingWearable(EWearableType type);
|
||||
void clearCOFLinksForMissingWearables();
|
||||
|
||||
void onWearableAssetFetch(LLWearable *wearable);
|
||||
void onAllComplete();
|
||||
|
||||
typedef std::list<LLFoundData> found_list_t;
|
||||
|
|
@ -450,12 +451,12 @@ void LLWearableHoldingPattern::onAllComplete()
|
|||
{
|
||||
llinfos << "Activating " << mGestItems.count() << " gestures" << llendl;
|
||||
|
||||
LLGestureManager::instance().activateGestures(mGestItems);
|
||||
LLGestureMgr::instance().activateGestures(mGestItems);
|
||||
|
||||
// Update the inventory item labels to reflect the fact
|
||||
// they are active.
|
||||
LLViewerInventoryCategory* catp =
|
||||
gInventory.getCategory(LLAppearanceManager::instance().getCOF());
|
||||
gInventory.getCategory(LLAppearanceMgr::instance().getCOF());
|
||||
|
||||
if (catp)
|
||||
{
|
||||
|
|
@ -466,11 +467,10 @@ void LLWearableHoldingPattern::onAllComplete()
|
|||
|
||||
// Update wearables.
|
||||
llinfos << "Updating agent wearables with " << mResolved << " wearable items " << llendl;
|
||||
LLAppearanceManager::instance().updateAgentWearables(this, false);
|
||||
LLAppearanceMgr::instance().updateAgentWearables(this, false);
|
||||
|
||||
// Update attachments to match those requested.
|
||||
LLVOAvatar* avatar = gAgent.getAvatarObject();
|
||||
if( avatar )
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
llinfos << "Updating " << mObjItems.count() << " attachments" << llendl;
|
||||
LLAgentWearables::userUpdateAttachments(mObjItems);
|
||||
|
|
@ -581,7 +581,7 @@ public:
|
|||
{
|
||||
link_inventory_item( gAgent.getID(),
|
||||
item_id,
|
||||
LLAppearanceManager::instance().getCOF(),
|
||||
LLAppearanceMgr::instance().getCOF(),
|
||||
itemp->getName(),
|
||||
LLAssetType::AT_LINK,
|
||||
cb);
|
||||
|
|
@ -632,7 +632,7 @@ void LLWearableHoldingPattern::clearCOFLinksForMissingWearables()
|
|||
{
|
||||
// Wearable link that was never resolved; remove links to it from COF
|
||||
llinfos << "removing link for unresolved item " << data.mItemID.asString() << llendl;
|
||||
LLAppearanceManager::instance().removeCOFItemLinks(data.mItemID,false);
|
||||
LLAppearanceMgr::instance().removeCOFItemLinks(data.mItemID,false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -657,11 +657,10 @@ bool LLWearableHoldingPattern::pollMissingWearables()
|
|||
return done;
|
||||
}
|
||||
|
||||
static void onWearableAssetFetch(LLWearable* wearable, void* data)
|
||||
void LLWearableHoldingPattern::onWearableAssetFetch(LLWearable *wearable)
|
||||
{
|
||||
LLWearableHoldingPattern* holder = (LLWearableHoldingPattern*)data;
|
||||
holder->mResolved += 1; // just counting callbacks, not successes.
|
||||
llinfos << "onWearableAssetFetch, resolved count " << holder->mResolved << " of requested " << holder->mFoundList.size() << llendl;
|
||||
mResolved += 1; // just counting callbacks, not successes.
|
||||
llinfos << "onWearableAssetFetch, resolved count " << mResolved << " of requested " << mFoundList.size() << llendl;
|
||||
if (wearable)
|
||||
{
|
||||
llinfos << "wearable found, type " << wearable->getType() << " asset " << wearable->getAssetID() << llendl;
|
||||
|
|
@ -671,7 +670,7 @@ static void onWearableAssetFetch(LLWearable* wearable, void* data)
|
|||
llwarns << "no wearable found" << llendl;
|
||||
}
|
||||
|
||||
if (holder->mFired)
|
||||
if (mFired)
|
||||
{
|
||||
llwarns << "called after holder fired" << llendl;
|
||||
return;
|
||||
|
|
@ -682,8 +681,8 @@ static void onWearableAssetFetch(LLWearable* wearable, void* data)
|
|||
return;
|
||||
}
|
||||
|
||||
for (LLWearableHoldingPattern::found_list_t::iterator iter = holder->mFoundList.begin();
|
||||
iter != holder->mFoundList.end(); ++iter)
|
||||
for (LLWearableHoldingPattern::found_list_t::iterator iter = mFoundList.begin();
|
||||
iter != mFoundList.end(); ++iter)
|
||||
{
|
||||
LLFoundData& data = *iter;
|
||||
if(wearable->getAssetID() == data.mAssetID)
|
||||
|
|
@ -696,6 +695,12 @@ static void onWearableAssetFetch(LLWearable* wearable, void* data)
|
|||
}
|
||||
}
|
||||
|
||||
static void onWearableAssetFetch(LLWearable* wearable, void* data)
|
||||
{
|
||||
LLWearableHoldingPattern* holder = (LLWearableHoldingPattern*)data;
|
||||
holder->onWearableAssetFetch(wearable);
|
||||
}
|
||||
|
||||
|
||||
static void removeDuplicateItems(LLInventoryModel::item_array_t& items)
|
||||
{
|
||||
|
|
@ -724,13 +729,13 @@ static void removeDuplicateItems(LLInventoryModel::item_array_t& items)
|
|||
items = new_items;
|
||||
}
|
||||
|
||||
const LLUUID LLAppearanceManager::getCOF() const
|
||||
const LLUUID LLAppearanceMgr::getCOF() const
|
||||
{
|
||||
return gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
|
||||
}
|
||||
|
||||
|
||||
const LLViewerInventoryItem* LLAppearanceManager::getBaseOutfitLink()
|
||||
const LLViewerInventoryItem* LLAppearanceMgr::getBaseOutfitLink()
|
||||
{
|
||||
const LLUUID& current_outfit_cat = getCOF();
|
||||
LLInventoryModel::cat_array_t cat_array;
|
||||
|
|
@ -758,7 +763,7 @@ const LLViewerInventoryItem* LLAppearanceManager::getBaseOutfitLink()
|
|||
return NULL;
|
||||
}
|
||||
|
||||
bool LLAppearanceManager::getBaseOutfitName(std::string& name)
|
||||
bool LLAppearanceMgr::getBaseOutfitName(std::string& name)
|
||||
{
|
||||
const LLViewerInventoryItem* outfit_link = getBaseOutfitLink();
|
||||
if(outfit_link)
|
||||
|
|
@ -774,15 +779,15 @@ bool LLAppearanceManager::getBaseOutfitName(std::string& name)
|
|||
}
|
||||
|
||||
// Update appearance from outfit folder.
|
||||
void LLAppearanceManager::changeOutfit(bool proceed, const LLUUID& category, bool append)
|
||||
void LLAppearanceMgr::changeOutfit(bool proceed, const LLUUID& category, bool append)
|
||||
{
|
||||
if (!proceed)
|
||||
return;
|
||||
LLAppearanceManager::instance().updateCOF(category,append);
|
||||
LLAppearanceMgr::instance().updateCOF(category,append);
|
||||
}
|
||||
|
||||
// Create a copy of src_id + contents as a subfolder of dst_id.
|
||||
void LLAppearanceManager::shallowCopyCategory(const LLUUID& src_id, const LLUUID& dst_id,
|
||||
void LLAppearanceMgr::shallowCopyCategory(const LLUUID& src_id, const LLUUID& dst_id,
|
||||
LLPointer<LLInventoryCallback> cb)
|
||||
{
|
||||
LLInventoryCategory *src_cat = gInventory.getCategory(src_id);
|
||||
|
|
@ -805,7 +810,7 @@ void LLAppearanceManager::shallowCopyCategory(const LLUUID& src_id, const LLUUID
|
|||
}
|
||||
|
||||
// Copy contents of src_id to dst_id.
|
||||
void LLAppearanceManager::shallowCopyCategoryContents(const LLUUID& src_id, const LLUUID& dst_id,
|
||||
void LLAppearanceMgr::shallowCopyCategoryContents(const LLUUID& src_id, const LLUUID& dst_id,
|
||||
LLPointer<LLInventoryCallback> cb)
|
||||
{
|
||||
LLInventoryModel::cat_array_t* cats;
|
||||
|
|
@ -861,7 +866,7 @@ void LLAppearanceManager::shallowCopyCategoryContents(const LLUUID& src_id, cons
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLAppearanceManager::getCanMakeFolderIntoOutfit(const LLUUID& folder_id)
|
||||
BOOL LLAppearanceMgr::getCanMakeFolderIntoOutfit(const LLUUID& folder_id)
|
||||
{
|
||||
// These are the wearable items that are required for considering this
|
||||
// folder as containing a complete outfit.
|
||||
|
|
@ -893,7 +898,7 @@ BOOL LLAppearanceManager::getCanMakeFolderIntoOutfit(const LLUUID& folder_id)
|
|||
}
|
||||
|
||||
|
||||
void LLAppearanceManager::purgeBaseOutfitLink(const LLUUID& category)
|
||||
void LLAppearanceMgr::purgeBaseOutfitLink(const LLUUID& category)
|
||||
{
|
||||
LLInventoryModel::cat_array_t cats;
|
||||
LLInventoryModel::item_array_t items;
|
||||
|
|
@ -915,7 +920,7 @@ void LLAppearanceManager::purgeBaseOutfitLink(const LLUUID& category)
|
|||
}
|
||||
}
|
||||
|
||||
void LLAppearanceManager::purgeCategory(const LLUUID& category, bool keep_outfit_links)
|
||||
void LLAppearanceMgr::purgeCategory(const LLUUID& category, bool keep_outfit_links)
|
||||
{
|
||||
LLInventoryModel::cat_array_t cats;
|
||||
LLInventoryModel::item_array_t items;
|
||||
|
|
@ -935,7 +940,7 @@ void LLAppearanceManager::purgeCategory(const LLUUID& category, bool keep_outfit
|
|||
|
||||
// Keep the last N wearables of each type. For viewer 2.0, N is 1 for
|
||||
// both body parts and clothing items.
|
||||
void LLAppearanceManager::filterWearableItems(
|
||||
void LLAppearanceMgr::filterWearableItems(
|
||||
LLInventoryModel::item_array_t& items, S32 max_per_type)
|
||||
{
|
||||
// Divvy items into arrays by wearable type.
|
||||
|
|
@ -971,7 +976,7 @@ void LLAppearanceManager::filterWearableItems(
|
|||
}
|
||||
|
||||
// Create links to all listed items.
|
||||
void LLAppearanceManager::linkAll(const LLUUID& category,
|
||||
void LLAppearanceMgr::linkAll(const LLUUID& category,
|
||||
LLInventoryModel::item_array_t& items,
|
||||
LLPointer<LLInventoryCallback> cb)
|
||||
{
|
||||
|
|
@ -987,7 +992,7 @@ void LLAppearanceManager::linkAll(const LLUUID& category,
|
|||
}
|
||||
}
|
||||
|
||||
void LLAppearanceManager::updateCOF(const LLUUID& category, bool append)
|
||||
void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
|
||||
{
|
||||
LLViewerInventoryCategory *pcat = gInventory.getCategory(category);
|
||||
llinfos << "starting, cat " << (pcat ? pcat->getName() : "[UNKNOWN]") << llendl;
|
||||
|
|
@ -1002,9 +1007,9 @@ void LLAppearanceManager::updateCOF(const LLUUID& category, bool append)
|
|||
for(S32 i = 0; i < gest_items.count(); ++i)
|
||||
{
|
||||
LLViewerInventoryItem *gest_item = gest_items.get(i);
|
||||
if ( LLGestureManager::instance().isGestureActive( gest_item->getLinkedUUID()) )
|
||||
if ( LLGestureMgr::instance().isGestureActive( gest_item->getLinkedUUID()) )
|
||||
{
|
||||
LLGestureManager::instance().deactivateGesture( gest_item->getLinkedUUID() );
|
||||
LLGestureMgr::instance().deactivateGesture( gest_item->getLinkedUUID() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1065,7 +1070,7 @@ void LLAppearanceManager::updateCOF(const LLUUID& category, bool append)
|
|||
llinfos << "waiting for LLUpdateAppearanceOnDestroy" << llendl;
|
||||
}
|
||||
|
||||
void LLAppearanceManager::updatePanelOutfitName(const std::string& name)
|
||||
void LLAppearanceMgr::updatePanelOutfitName(const std::string& name)
|
||||
{
|
||||
LLSidepanelAppearance* panel_appearance =
|
||||
dynamic_cast<LLSidepanelAppearance *>(LLSideTray::getInstance()->getPanel("sidepanel_appearance"));
|
||||
|
|
@ -1075,7 +1080,7 @@ void LLAppearanceManager::updatePanelOutfitName(const std::string& name)
|
|||
}
|
||||
}
|
||||
|
||||
void LLAppearanceManager::createBaseOutfitLink(const LLUUID& category, LLPointer<LLInventoryCallback> link_waiter)
|
||||
void LLAppearanceMgr::createBaseOutfitLink(const LLUUID& category, LLPointer<LLInventoryCallback> link_waiter)
|
||||
{
|
||||
const LLUUID cof = getCOF();
|
||||
LLViewerInventoryCategory* catp = gInventory.getCategory(category);
|
||||
|
|
@ -1093,7 +1098,7 @@ void LLAppearanceManager::createBaseOutfitLink(const LLUUID& category, LLPointer
|
|||
updatePanelOutfitName(new_outfit_name);
|
||||
}
|
||||
|
||||
void LLAppearanceManager::updateAgentWearables(LLWearableHoldingPattern* holder, bool append)
|
||||
void LLAppearanceMgr::updateAgentWearables(LLWearableHoldingPattern* holder, bool append)
|
||||
{
|
||||
lldebugs << "updateAgentWearables()" << llendl;
|
||||
LLInventoryItem::item_array_t items;
|
||||
|
|
@ -1146,7 +1151,7 @@ static void remove_non_link_items(LLInventoryModel::item_array_t &items)
|
|||
items = pruned_items;
|
||||
}
|
||||
|
||||
void LLAppearanceManager::updateAppearanceFromCOF()
|
||||
void LLAppearanceMgr::updateAppearanceFromCOF()
|
||||
{
|
||||
// update dirty flag to see if the state of the COF matches
|
||||
// the saved outfit stored as a folder link
|
||||
|
|
@ -1160,7 +1165,7 @@ void LLAppearanceManager::updateAppearanceFromCOF()
|
|||
LLUUID current_outfit_id = getCOF();
|
||||
|
||||
// Find all the wearables that are in the COF's subtree.
|
||||
lldebugs << "LLAppearanceManager::updateFromCOF()" << llendl;
|
||||
lldebugs << "LLAppearanceMgr::updateFromCOF()" << llendl;
|
||||
LLInventoryModel::item_array_t wear_items;
|
||||
LLInventoryModel::item_array_t obj_items;
|
||||
LLInventoryModel::item_array_t gest_items;
|
||||
|
|
@ -1186,9 +1191,6 @@ void LLAppearanceManager::updateAppearanceFromCOF()
|
|||
// callback will be called (and this object deleted)
|
||||
// before the final getNextData().
|
||||
|
||||
// BAP future cleanup - no point having found_container when
|
||||
// mFoundList already has all the info.
|
||||
LLDynamicArray<LLFoundData> found_container;
|
||||
for(S32 i = 0; i < wear_items.count(); ++i)
|
||||
{
|
||||
LLViewerInventoryItem *item = wear_items.get(i);
|
||||
|
|
@ -1214,7 +1216,6 @@ void LLAppearanceManager::updateAppearanceFromCOF()
|
|||
#endif
|
||||
|
||||
holder->mFoundList.push_front(found);
|
||||
found_container.put(found);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1229,9 +1230,10 @@ void LLAppearanceManager::updateAppearanceFromCOF()
|
|||
}
|
||||
}
|
||||
|
||||
for(S32 i = 0; i < found_container.count(); ++i)
|
||||
for (LLWearableHoldingPattern::found_list_t::iterator it = holder->mFoundList.begin();
|
||||
it != holder->mFoundList.end(); ++it)
|
||||
{
|
||||
LLFoundData& found = found_container.get(i);
|
||||
LLFoundData& found = *it;
|
||||
|
||||
llinfos << "waiting for onWearableAssetFetch callback, asset " << found.mAssetID.asString() << llendl;
|
||||
|
||||
|
|
@ -1248,10 +1250,9 @@ void LLAppearanceManager::updateAppearanceFromCOF()
|
|||
{
|
||||
doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollFetchCompletion,holder));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void LLAppearanceManager::getDescendentsOfAssetType(const LLUUID& category,
|
||||
void LLAppearanceMgr::getDescendentsOfAssetType(const LLUUID& category,
|
||||
LLInventoryModel::item_array_t& items,
|
||||
LLAssetType::EType type,
|
||||
bool follow_folder_links)
|
||||
|
|
@ -1266,7 +1267,7 @@ void LLAppearanceManager::getDescendentsOfAssetType(const LLUUID& category,
|
|||
follow_folder_links);
|
||||
}
|
||||
|
||||
void LLAppearanceManager::getUserDescendents(const LLUUID& category,
|
||||
void LLAppearanceMgr::getUserDescendents(const LLUUID& category,
|
||||
LLInventoryModel::item_array_t& wear_items,
|
||||
LLInventoryModel::item_array_t& obj_items,
|
||||
LLInventoryModel::item_array_t& gest_items,
|
||||
|
|
@ -1301,7 +1302,7 @@ void LLAppearanceManager::getUserDescendents(const LLUUID& category,
|
|||
follow_folder_links);
|
||||
}
|
||||
|
||||
void LLAppearanceManager::wearInventoryCategory(LLInventoryCategory* category, bool copy, bool append)
|
||||
void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool copy, bool append)
|
||||
{
|
||||
if(!category) return;
|
||||
|
||||
|
|
@ -1312,7 +1313,7 @@ void LLAppearanceManager::wearInventoryCategory(LLInventoryCategory* category, b
|
|||
// the inventory, and set up an observer that will wait for that to
|
||||
// happen.
|
||||
LLOutfitFetch* outfit_fetcher = new LLOutfitFetch(copy, append);
|
||||
LLInventoryFetchDescendentsObserver::folder_ref_t folders;
|
||||
uuid_vec_t folders;
|
||||
folders.push_back(category->getUUID());
|
||||
outfit_fetcher->fetchDescendents(folders);
|
||||
//inc_busy_count();
|
||||
|
|
@ -1330,7 +1331,7 @@ void LLAppearanceManager::wearInventoryCategory(LLInventoryCategory* category, b
|
|||
}
|
||||
|
||||
// *NOTE: hack to get from avatar inventory to avatar
|
||||
void LLAppearanceManager::wearInventoryCategoryOnAvatar( LLInventoryCategory* category, bool append )
|
||||
void LLAppearanceMgr::wearInventoryCategoryOnAvatar( LLInventoryCategory* category, bool append )
|
||||
{
|
||||
// Avoid unintentionally overwriting old wearables. We have to do
|
||||
// this up front to avoid having to deal with the case of multiple
|
||||
|
|
@ -1342,17 +1343,17 @@ void LLAppearanceManager::wearInventoryCategoryOnAvatar( LLInventoryCategory* ca
|
|||
|
||||
if( gFloaterCustomize )
|
||||
{
|
||||
gFloaterCustomize->askToSaveIfDirty(boost::bind(&LLAppearanceManager::changeOutfit,
|
||||
&LLAppearanceManager::instance(),
|
||||
gFloaterCustomize->askToSaveIfDirty(boost::bind(&LLAppearanceMgr::changeOutfit,
|
||||
&LLAppearanceMgr::instance(),
|
||||
_1, category->getUUID(), append));
|
||||
}
|
||||
else
|
||||
{
|
||||
LLAppearanceManager::changeOutfit(TRUE, category->getUUID(), append);
|
||||
LLAppearanceMgr::changeOutfit(TRUE, category->getUUID(), append);
|
||||
}
|
||||
}
|
||||
|
||||
void LLAppearanceManager::wearOutfitByName(const std::string& name)
|
||||
void LLAppearanceMgr::wearOutfitByName(const std::string& name)
|
||||
{
|
||||
llinfos << "Wearing category " << name << llendl;
|
||||
//inc_busy_count();
|
||||
|
|
@ -1388,7 +1389,7 @@ void LLAppearanceManager::wearOutfitByName(const std::string& name)
|
|||
|
||||
if(cat)
|
||||
{
|
||||
LLAppearanceManager::wearInventoryCategory(cat, copy_items, false);
|
||||
LLAppearanceMgr::wearInventoryCategory(cat, copy_items, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1424,7 +1425,7 @@ public:
|
|||
if (item)
|
||||
{
|
||||
gInventory.removeObserver(this);
|
||||
LLAppearanceManager::instance().addCOFItemLink(item,mDoUpdate);
|
||||
LLAppearanceMgr::instance().addCOFItemLink(item,mDoUpdate);
|
||||
delete this;
|
||||
}
|
||||
}
|
||||
|
|
@ -1435,7 +1436,7 @@ private:
|
|||
};
|
||||
|
||||
|
||||
void LLAppearanceManager::addCOFItemLink(const LLUUID &item_id, bool do_update )
|
||||
void LLAppearanceMgr::addCOFItemLink(const LLUUID &item_id, bool do_update )
|
||||
{
|
||||
const LLInventoryItem *item = gInventory.getItem(item_id);
|
||||
if (!item)
|
||||
|
|
@ -1449,7 +1450,7 @@ void LLAppearanceManager::addCOFItemLink(const LLUUID &item_id, bool do_update )
|
|||
}
|
||||
}
|
||||
|
||||
void LLAppearanceManager::addCOFItemLink(const LLInventoryItem *item, bool do_update )
|
||||
void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, bool do_update )
|
||||
{
|
||||
const LLViewerInventoryItem *vitem = dynamic_cast<const LLViewerInventoryItem*>(item);
|
||||
if (!vitem)
|
||||
|
|
@ -1462,7 +1463,7 @@ void LLAppearanceManager::addCOFItemLink(const LLInventoryItem *item, bool do_up
|
|||
|
||||
LLInventoryModel::cat_array_t cat_array;
|
||||
LLInventoryModel::item_array_t item_array;
|
||||
gInventory.collectDescendents(LLAppearanceManager::getCOF(),
|
||||
gInventory.collectDescendents(LLAppearanceMgr::getCOF(),
|
||||
cat_array,
|
||||
item_array,
|
||||
LLInventoryModel::EXCLUDE_TRASH);
|
||||
|
|
@ -1490,7 +1491,7 @@ void LLAppearanceManager::addCOFItemLink(const LLInventoryItem *item, bool do_up
|
|||
{
|
||||
if (do_update)
|
||||
{
|
||||
LLAppearanceManager::updateAppearanceFromCOF();
|
||||
LLAppearanceMgr::updateAppearanceFromCOF();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -1507,7 +1508,8 @@ void LLAppearanceManager::addCOFItemLink(const LLInventoryItem *item, bool do_up
|
|||
return;
|
||||
}
|
||||
|
||||
void LLAppearanceManager::addEnsembleLink( LLInventoryCategory* cat, bool do_update )
|
||||
// BAP remove ensemble code for 2.1?
|
||||
void LLAppearanceMgr::addEnsembleLink( LLInventoryCategory* cat, bool do_update )
|
||||
{
|
||||
#if SUPPORT_ENSEMBLES
|
||||
// BAP add check for already in COF.
|
||||
|
|
@ -1521,13 +1523,13 @@ void LLAppearanceManager::addEnsembleLink( LLInventoryCategory* cat, bool do_upd
|
|||
#endif
|
||||
}
|
||||
|
||||
void LLAppearanceManager::removeCOFItemLinks(const LLUUID& item_id, bool do_update)
|
||||
void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id, bool do_update)
|
||||
{
|
||||
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
|
||||
|
||||
LLInventoryModel::cat_array_t cat_array;
|
||||
LLInventoryModel::item_array_t item_array;
|
||||
gInventory.collectDescendents(LLAppearanceManager::getCOF(),
|
||||
gInventory.collectDescendents(LLAppearanceMgr::getCOF(),
|
||||
cat_array,
|
||||
item_array,
|
||||
LLInventoryModel::EXCLUDE_TRASH);
|
||||
|
|
@ -1541,11 +1543,11 @@ void LLAppearanceManager::removeCOFItemLinks(const LLUUID& item_id, bool do_upda
|
|||
}
|
||||
if (do_update)
|
||||
{
|
||||
LLAppearanceManager::updateAppearanceFromCOF();
|
||||
LLAppearanceMgr::updateAppearanceFromCOF();
|
||||
}
|
||||
}
|
||||
|
||||
void LLAppearanceManager::updateIsDirty()
|
||||
void LLAppearanceMgr::updateIsDirty()
|
||||
{
|
||||
LLUUID cof = getCOF();
|
||||
LLUUID base_outfit;
|
||||
|
|
@ -1614,7 +1616,7 @@ void LLAppearanceManager::updateIsDirty()
|
|||
}
|
||||
}
|
||||
|
||||
void LLAppearanceManager::onFirstFullyVisible()
|
||||
void LLAppearanceMgr::onFirstFullyVisible()
|
||||
{
|
||||
// If this is the very first time the user has logged into viewer2+ (from a legacy viewer, or new account)
|
||||
// then auto-populate outfits from the library into the My Outfits folder.
|
||||
|
|
@ -1633,7 +1635,7 @@ void LLAppearanceManager::onFirstFullyVisible()
|
|||
|
||||
//#define DUMP_CAT_VERBOSE
|
||||
|
||||
void LLAppearanceManager::dumpCat(const LLUUID& cat_id, const std::string& msg)
|
||||
void LLAppearanceMgr::dumpCat(const LLUUID& cat_id, const std::string& msg)
|
||||
{
|
||||
LLInventoryModel::cat_array_t cats;
|
||||
LLInventoryModel::item_array_t items;
|
||||
|
|
@ -1654,7 +1656,7 @@ void LLAppearanceManager::dumpCat(const LLUUID& cat_id, const std::string& msg)
|
|||
llinfos << msg << " count " << items.count() << llendl;
|
||||
}
|
||||
|
||||
void LLAppearanceManager::dumpItemArray(const LLInventoryModel::item_array_t& items,
|
||||
void LLAppearanceMgr::dumpItemArray(const LLInventoryModel::item_array_t& items,
|
||||
const std::string& msg)
|
||||
{
|
||||
llinfos << msg << llendl;
|
||||
|
|
@ -1666,17 +1668,17 @@ void LLAppearanceManager::dumpItemArray(const LLInventoryModel::item_array_t& it
|
|||
llinfos << llendl;
|
||||
}
|
||||
|
||||
LLAppearanceManager::LLAppearanceManager():
|
||||
LLAppearanceMgr::LLAppearanceMgr():
|
||||
mAttachmentInvLinkEnabled(false),
|
||||
mOutfitIsDirty(false)
|
||||
{
|
||||
}
|
||||
|
||||
LLAppearanceManager::~LLAppearanceManager()
|
||||
LLAppearanceMgr::~LLAppearanceMgr()
|
||||
{
|
||||
}
|
||||
|
||||
void LLAppearanceManager::setAttachmentInvLinkEnable(bool val)
|
||||
void LLAppearanceMgr::setAttachmentInvLinkEnable(bool val)
|
||||
{
|
||||
llinfos << "setAttachmentInvLinkEnable => " << (int) val << llendl;
|
||||
mAttachmentInvLinkEnabled = val;
|
||||
|
|
@ -1699,7 +1701,7 @@ void dumpAttachmentSet(const std::set<LLUUID>& atts, const std::string& msg)
|
|||
llinfos << llendl;
|
||||
}
|
||||
|
||||
void LLAppearanceManager::registerAttachment(const LLUUID& item_id)
|
||||
void LLAppearanceMgr::registerAttachment(const LLUUID& item_id)
|
||||
{
|
||||
mRegisteredAttachments.insert(item_id);
|
||||
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
|
||||
|
|
@ -1707,7 +1709,7 @@ void LLAppearanceManager::registerAttachment(const LLUUID& item_id)
|
|||
|
||||
if (mAttachmentInvLinkEnabled)
|
||||
{
|
||||
LLAppearanceManager::addCOFItemLink(item_id, false); // Add COF link for item.
|
||||
LLAppearanceMgr::addCOFItemLink(item_id, false); // Add COF link for item.
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1715,7 +1717,7 @@ void LLAppearanceManager::registerAttachment(const LLUUID& item_id)
|
|||
}
|
||||
}
|
||||
|
||||
void LLAppearanceManager::unregisterAttachment(const LLUUID& item_id)
|
||||
void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id)
|
||||
{
|
||||
mRegisteredAttachments.erase(item_id);
|
||||
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
|
||||
|
|
@ -1724,8 +1726,8 @@ void LLAppearanceManager::unregisterAttachment(const LLUUID& item_id)
|
|||
|
||||
if (mAttachmentInvLinkEnabled)
|
||||
{
|
||||
//LLAppearanceManager::dumpCat(LLAppearanceManager::getCOF(),"Removing attachment link:");
|
||||
LLAppearanceManager::removeCOFItemLinks(item_id, false);
|
||||
//LLAppearanceMgr::dumpCat(LLAppearanceMgr::getCOF(),"Removing attachment link:");
|
||||
LLAppearanceMgr::removeCOFItemLinks(item_id, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1733,7 +1735,7 @@ void LLAppearanceManager::unregisterAttachment(const LLUUID& item_id)
|
|||
}
|
||||
}
|
||||
|
||||
void LLAppearanceManager::linkRegisteredAttachments()
|
||||
void LLAppearanceMgr::linkRegisteredAttachments()
|
||||
{
|
||||
for (std::set<LLUUID>::iterator it = mRegisteredAttachments.begin();
|
||||
it != mRegisteredAttachments.end();
|
||||
|
|
@ -1745,12 +1747,12 @@ void LLAppearanceManager::linkRegisteredAttachments()
|
|||
mRegisteredAttachments.clear();
|
||||
}
|
||||
|
||||
BOOL LLAppearanceManager::getIsInCOF(const LLUUID& obj_id) const
|
||||
BOOL LLAppearanceMgr::getIsInCOF(const LLUUID& obj_id) const
|
||||
{
|
||||
return gInventory.isObjectDescendentOf(obj_id, getCOF());
|
||||
}
|
||||
|
||||
BOOL LLAppearanceManager::getIsProtectedCOFItem(const LLUUID& obj_id) const
|
||||
BOOL LLAppearanceMgr::getIsProtectedCOFItem(const LLUUID& obj_id) const
|
||||
{
|
||||
if (!getIsInCOF(obj_id)) return FALSE;
|
||||
|
||||
|
|
|
|||
|
|
@ -43,9 +43,9 @@ class LLWearable;
|
|||
class LLWearableHoldingPattern;
|
||||
class LLInventoryCallback;
|
||||
|
||||
class LLAppearanceManager: public LLSingleton<LLAppearanceManager>
|
||||
class LLAppearanceMgr: public LLSingleton<LLAppearanceMgr>
|
||||
{
|
||||
friend class LLSingleton<LLAppearanceManager>;
|
||||
friend class LLSingleton<LLAppearanceMgr>;
|
||||
|
||||
public:
|
||||
void updateAppearanceFromCOF();
|
||||
|
|
@ -120,8 +120,8 @@ public:
|
|||
void onFirstFullyVisible();
|
||||
|
||||
protected:
|
||||
LLAppearanceManager();
|
||||
~LLAppearanceManager();
|
||||
LLAppearanceMgr();
|
||||
~LLAppearanceMgr();
|
||||
|
||||
private:
|
||||
|
||||
|
|
@ -324,7 +324,7 @@ template <class T>
|
|||
void callAfterCategoryFetch(const LLUUID& cat_id, T callable)
|
||||
{
|
||||
CallAfterCategoryFetchStage1<T> *stage1 = new CallAfterCategoryFetchStage1<T>(callable);
|
||||
LLInventoryFetchDescendentsObserver::folder_ref_t folders;
|
||||
uuid_vec_t folders;
|
||||
folders.push_back(cat_id);
|
||||
stage1->fetchDescendents(folders);
|
||||
if (stage1->isEverythingComplete())
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@
|
|||
#include "lllocationhistory.h"
|
||||
#include "llfasttimerview.h"
|
||||
#include "llvoicechannel.h"
|
||||
#include "llvoavatarself.h"
|
||||
#include "llsidetray.h"
|
||||
|
||||
|
||||
|
|
@ -356,7 +357,7 @@ void request_initial_instant_messages()
|
|||
if (!requested
|
||||
&& gMessageSystem
|
||||
&& LLMuteList::getInstance()->isLoaded()
|
||||
&& gAgent.getAvatarObject())
|
||||
&& isAgentAvatarValid())
|
||||
{
|
||||
// Auto-accepted inventory items may require the avatar object
|
||||
// to build a correct name. Likewise, inventory offers from
|
||||
|
|
@ -1648,7 +1649,7 @@ bool LLAppViewer::cleanup()
|
|||
// HACK: Attempt to wait until the screen res. switch is complete.
|
||||
ms_sleep(1000);
|
||||
|
||||
LLWeb::loadURLExternal( gLaunchFileOnQuit );
|
||||
LLWeb::loadURLExternal( gLaunchFileOnQuit, false );
|
||||
llinfos << "File launched." << llendflush;
|
||||
}
|
||||
|
||||
|
|
@ -3619,7 +3620,7 @@ void LLAppViewer::idle()
|
|||
// Handle pending gesture processing
|
||||
static LLFastTimer::DeclareTimer ftm("Agent Position");
|
||||
LLFastTimer t(ftm);
|
||||
LLGestureManager::instance().update();
|
||||
LLGestureMgr::instance().update();
|
||||
|
||||
gAgent.updateAgentPosition(gFrameDTClamped, yaw, current_mouse.mX, current_mouse.mY);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -469,7 +469,7 @@ bool LLAppViewerWin32::initHardwareTest()
|
|||
if (OSBTN_NO== button)
|
||||
{
|
||||
LL_INFOS("AppInit") << "User quitting after failed DirectX 9 detection" << LL_ENDL;
|
||||
LLWeb::loadURLExternal(DIRECTX_9_URL);
|
||||
LLWeb::loadURLExternal(DIRECTX_9_URL, false);
|
||||
return false;
|
||||
}
|
||||
gWarningSettings.setBOOL("AboutDirectX9", FALSE);
|
||||
|
|
|
|||
|
|
@ -487,10 +487,10 @@ void LLUpdateAgentInventoryResponder::uploadComplete(const LLSD& content)
|
|||
{
|
||||
// If this gesture is active, then we need to update the in-memory
|
||||
// active map with the new pointer.
|
||||
if (LLGestureManager::instance().isGestureActive(item_id))
|
||||
if (LLGestureMgr::instance().isGestureActive(item_id))
|
||||
{
|
||||
LLUUID asset_id = new_item->getAssetUUID();
|
||||
LLGestureManager::instance().replaceGesture(item_id, asset_id);
|
||||
LLGestureMgr::instance().replaceGesture(item_id, asset_id);
|
||||
gInventory.notifyObservers();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -113,13 +113,13 @@ void LLAvatarActions::removeFriendDialog(const LLUUID& id)
|
|||
if (id.isNull())
|
||||
return;
|
||||
|
||||
std::vector<LLUUID> ids;
|
||||
uuid_vec_t ids;
|
||||
ids.push_back(id);
|
||||
removeFriendsDialog(ids);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLAvatarActions::removeFriendsDialog(const std::vector<LLUUID>& ids)
|
||||
void LLAvatarActions::removeFriendsDialog(const uuid_vec_t& ids)
|
||||
{
|
||||
if(ids.size() == 0)
|
||||
return;
|
||||
|
|
@ -144,7 +144,7 @@ void LLAvatarActions::removeFriendsDialog(const std::vector<LLUUID>& ids)
|
|||
}
|
||||
|
||||
LLSD payload;
|
||||
for (std::vector<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); ++it)
|
||||
for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
|
||||
{
|
||||
payload["ids"].append(*it);
|
||||
}
|
||||
|
|
@ -175,7 +175,7 @@ void LLAvatarActions::offerTeleport(const LLUUID& invitee)
|
|||
}
|
||||
|
||||
// static
|
||||
void LLAvatarActions::offerTeleport(const std::vector<LLUUID>& ids)
|
||||
void LLAvatarActions::offerTeleport(const uuid_vec_t& ids)
|
||||
{
|
||||
if (ids.size() == 0)
|
||||
return;
|
||||
|
|
@ -236,7 +236,7 @@ void LLAvatarActions::startCall(const LLUUID& id)
|
|||
}
|
||||
|
||||
// static
|
||||
void LLAvatarActions::startAdhocCall(const std::vector<LLUUID>& ids)
|
||||
void LLAvatarActions::startAdhocCall(const uuid_vec_t& ids)
|
||||
{
|
||||
if (ids.size() == 0)
|
||||
{
|
||||
|
|
@ -245,7 +245,7 @@ void LLAvatarActions::startAdhocCall(const std::vector<LLUUID>& ids)
|
|||
|
||||
// convert vector into LLDynamicArray for addSession
|
||||
LLDynamicArray<LLUUID> id_array;
|
||||
for (std::vector<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); ++it)
|
||||
for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
|
||||
{
|
||||
id_array.push_back(*it);
|
||||
}
|
||||
|
|
@ -286,11 +286,11 @@ bool LLAvatarActions::canCall()
|
|||
}
|
||||
|
||||
// static
|
||||
void LLAvatarActions::startConference(const std::vector<LLUUID>& ids)
|
||||
void LLAvatarActions::startConference(const uuid_vec_t& ids)
|
||||
{
|
||||
// *HACK: Copy into dynamic array
|
||||
LLDynamicArray<LLUUID> id_array;
|
||||
for (std::vector<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); ++it)
|
||||
for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
|
||||
{
|
||||
id_array.push_back(*it);
|
||||
}
|
||||
|
|
@ -521,7 +521,7 @@ bool LLAvatarActions::handlePay(const LLSD& notification, const LLSD& response,
|
|||
// static
|
||||
void LLAvatarActions::callback_invite_to_group(LLUUID group_id, LLUUID id)
|
||||
{
|
||||
std::vector<LLUUID> agent_ids;
|
||||
uuid_vec_t agent_ids;
|
||||
agent_ids.push_back(id);
|
||||
|
||||
LLFloaterGroupInvite::showForGroup(group_id, &agent_ids);
|
||||
|
|
|
|||
|
|
@ -60,13 +60,13 @@ public:
|
|||
* Show a friend removal dialog.
|
||||
*/
|
||||
static void removeFriendDialog(const LLUUID& id);
|
||||
static void removeFriendsDialog(const std::vector<LLUUID>& ids);
|
||||
static void removeFriendsDialog(const uuid_vec_t& ids);
|
||||
|
||||
/**
|
||||
* Show teleport offer dialog.
|
||||
*/
|
||||
static void offerTeleport(const LLUUID& invitee);
|
||||
static void offerTeleport(const std::vector<LLUUID>& ids);
|
||||
static void offerTeleport(const uuid_vec_t& ids);
|
||||
|
||||
/**
|
||||
* Start instant messaging session.
|
||||
|
|
@ -86,12 +86,12 @@ public:
|
|||
/**
|
||||
* Start an ad-hoc conference voice call with multiple users
|
||||
*/
|
||||
static void startAdhocCall(const std::vector<LLUUID>& ids);
|
||||
static void startAdhocCall(const uuid_vec_t& ids);
|
||||
|
||||
/**
|
||||
* Start conference chat with the given avatars.
|
||||
*/
|
||||
static void startConference(const std::vector<LLUUID>& ids);
|
||||
static void startConference(const uuid_vec_t& ids);
|
||||
|
||||
/**
|
||||
* Show avatar profile.
|
||||
|
|
|
|||
|
|
@ -204,17 +204,17 @@ void LLAvatarList::refresh()
|
|||
bool have_filter = !mNameFilter.empty();
|
||||
|
||||
// Save selection.
|
||||
std::vector<LLUUID> selected_ids;
|
||||
uuid_vec_t selected_ids;
|
||||
getSelectedUUIDs(selected_ids);
|
||||
LLUUID current_id = getSelectedUUID();
|
||||
|
||||
// Determine what to add and what to remove.
|
||||
std::vector<LLUUID> added, removed;
|
||||
uuid_vec_t added, removed;
|
||||
LLAvatarList::computeDifference(getIDs(), added, removed);
|
||||
|
||||
// Handle added items.
|
||||
unsigned nadded = 0;
|
||||
for (std::vector<LLUUID>::const_iterator it=added.begin(); it != added.end(); it++)
|
||||
for (uuid_vec_t::const_iterator it=added.begin(); it != added.end(); it++)
|
||||
{
|
||||
std::string name;
|
||||
const LLUUID& buddy_id = *it;
|
||||
|
|
@ -236,7 +236,7 @@ void LLAvatarList::refresh()
|
|||
}
|
||||
|
||||
// Handle removed items.
|
||||
for (std::vector<LLUUID>::const_iterator it=removed.begin(); it != removed.end(); it++)
|
||||
for (uuid_vec_t::const_iterator it=removed.begin(); it != removed.end(); it++)
|
||||
{
|
||||
removeItemByUUID(*it);
|
||||
modified = true;
|
||||
|
|
@ -369,7 +369,7 @@ BOOL LLAvatarList::handleRightMouseDown(S32 x, S32 y, MASK mask)
|
|||
BOOL handled = LLUICtrl::handleRightMouseDown(x, y, mask);
|
||||
if ( mContextMenu )
|
||||
{
|
||||
std::vector<LLUUID> selected_uuids;
|
||||
uuid_vec_t selected_uuids;
|
||||
getSelectedUUIDs(selected_uuids);
|
||||
mContextMenu->show(this, selected_uuids, x, y);
|
||||
}
|
||||
|
|
@ -377,12 +377,12 @@ BOOL LLAvatarList::handleRightMouseDown(S32 x, S32 y, MASK mask)
|
|||
}
|
||||
|
||||
void LLAvatarList::computeDifference(
|
||||
const std::vector<LLUUID>& vnew_unsorted,
|
||||
std::vector<LLUUID>& vadded,
|
||||
std::vector<LLUUID>& vremoved)
|
||||
const uuid_vec_t& vnew_unsorted,
|
||||
uuid_vec_t& vadded,
|
||||
uuid_vec_t& vremoved)
|
||||
{
|
||||
std::vector<LLUUID> vcur;
|
||||
std::vector<LLUUID> vnew = vnew_unsorted;
|
||||
uuid_vec_t vcur;
|
||||
uuid_vec_t vnew = vnew_unsorted;
|
||||
|
||||
// Convert LLSDs to LLUUIDs.
|
||||
{
|
||||
|
|
@ -396,7 +396,7 @@ void LLAvatarList::computeDifference(
|
|||
std::sort(vcur.begin(), vcur.end());
|
||||
std::sort(vnew.begin(), vnew.end());
|
||||
|
||||
std::vector<LLUUID>::iterator it;
|
||||
uuid_vec_t::iterator it;
|
||||
size_t maxsize = llmax(vcur.size(), vnew.size());
|
||||
vadded.resize(maxsize);
|
||||
vremoved.resize(maxsize);
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class LLAvatarList : public LLFlatListView
|
|||
{
|
||||
LOG_CLASS(LLAvatarList);
|
||||
public:
|
||||
typedef std::vector<LLUUID> uuid_vector_t;
|
||||
typedef uuid_vec_t uuid_vector_t;
|
||||
|
||||
struct Params : public LLInitParam::Block<Params, LLFlatListView::Params>
|
||||
{
|
||||
|
|
@ -103,9 +103,9 @@ protected:
|
|||
|
||||
void addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos = ADD_BOTTOM);
|
||||
void computeDifference(
|
||||
const std::vector<LLUUID>& vnew,
|
||||
std::vector<LLUUID>& vadded,
|
||||
std::vector<LLUUID>& vremoved);
|
||||
const uuid_vec_t& vnew,
|
||||
uuid_vec_t& vadded,
|
||||
uuid_vec_t& vremoved);
|
||||
void updateLastInteractionTimes();
|
||||
void onItemDoucleClicked(LLUICtrl* ctrl, S32 x, S32 y, MASK mask);
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public:
|
|||
class ContextMenu
|
||||
{
|
||||
public:
|
||||
virtual void show(LLView* spawning_view, const std::vector<LLUUID>& selected_uuids, S32 x, S32 y) = 0;
|
||||
virtual void show(LLView* spawning_view, const uuid_vec_t& selected_uuids, S32 x, S32 y) = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
#include "llvoicechannel.h"
|
||||
#include "llviewerparcelmgr.h"
|
||||
|
||||
static void get_voice_participants_uuids(std::vector<LLUUID>& speakers_uuids);
|
||||
static void get_voice_participants_uuids(uuid_vec_t& speakers_uuids);
|
||||
void reshape_floater(LLCallFloater* floater, S32 delta_height);
|
||||
|
||||
class LLNonAvatarCaller : public LLAvatarListItem
|
||||
|
|
@ -213,9 +213,9 @@ void LLCallFloater::onChange()
|
|||
updateParticipantsVoiceState();
|
||||
|
||||
// Add newly joined participants.
|
||||
std::vector<LLUUID> speakers_uuids;
|
||||
uuid_vec_t speakers_uuids;
|
||||
get_voice_participants_uuids(speakers_uuids);
|
||||
for (std::vector<LLUUID>::const_iterator it = speakers_uuids.begin(); it != speakers_uuids.end(); it++)
|
||||
for (uuid_vec_t::const_iterator it = speakers_uuids.begin(); it != speakers_uuids.end(); it++)
|
||||
{
|
||||
mParticipants->addAvatarIDExceptAgent(*it);
|
||||
}
|
||||
|
|
@ -469,7 +469,7 @@ void LLCallFloater::updateAgentModeratorState()
|
|||
mAgentPanel->childSetValue("user_text", name);
|
||||
}
|
||||
|
||||
static void get_voice_participants_uuids(std::vector<LLUUID>& speakers_uuids)
|
||||
static void get_voice_participants_uuids(uuid_vec_t& speakers_uuids)
|
||||
{
|
||||
// Get a list of participants from VoiceClient
|
||||
LLVoiceClient::participantMap *voice_map = gVoiceClient->getParticipantList();
|
||||
|
|
@ -494,7 +494,7 @@ void LLCallFloater::initParticipantsVoiceState()
|
|||
it_end = items.end();
|
||||
|
||||
|
||||
std::vector<LLUUID> speakers_uuids;
|
||||
uuid_vec_t speakers_uuids;
|
||||
get_voice_participants_uuids(speakers_uuids);
|
||||
|
||||
for(; it != it_end; ++it)
|
||||
|
|
@ -505,7 +505,7 @@ void LLCallFloater::initParticipantsVoiceState()
|
|||
|
||||
LLUUID speaker_id = item->getAvatarId();
|
||||
|
||||
std::vector<LLUUID>::const_iterator speaker_iter = std::find(speakers_uuids.begin(), speakers_uuids.end(), speaker_id);
|
||||
uuid_vec_t::const_iterator speaker_iter = std::find(speakers_uuids.begin(), speakers_uuids.end(), speaker_id);
|
||||
|
||||
// If an avatarID assigned to a panel is found in a speakers list
|
||||
// obtained from VoiceClient we assign the JOINED status to the owner
|
||||
|
|
@ -534,10 +534,10 @@ void LLCallFloater::initParticipantsVoiceState()
|
|||
|
||||
void LLCallFloater::updateParticipantsVoiceState()
|
||||
{
|
||||
std::vector<LLUUID> speakers_list;
|
||||
uuid_vec_t speakers_list;
|
||||
|
||||
// Get a list of participants from VoiceClient
|
||||
std::vector<LLUUID> speakers_uuids;
|
||||
uuid_vec_t speakers_uuids;
|
||||
get_voice_participants_uuids(speakers_uuids);
|
||||
|
||||
// Updating the status for each participant already in list.
|
||||
|
|
@ -555,7 +555,7 @@ void LLCallFloater::updateParticipantsVoiceState()
|
|||
const LLUUID participant_id = item->getAvatarId();
|
||||
bool found = false;
|
||||
|
||||
std::vector<LLUUID>::iterator speakers_iter = std::find(speakers_uuids.begin(), speakers_uuids.end(), participant_id);
|
||||
uuid_vec_t::iterator speakers_iter = std::find(speakers_uuids.begin(), speakers_uuids.end(), participant_id);
|
||||
|
||||
lldebugs << "processing speaker: " << item->getAvatarName() << ", " << item->getAvatarId() << llendl;
|
||||
|
||||
|
|
@ -695,7 +695,7 @@ bool LLCallFloater::validateSpeaker(const LLUUID& speaker_id)
|
|||
case VC_LOCAL_CHAT:
|
||||
{
|
||||
// A nearby chat speaker is considered valid it it's known to LLVoiceClient (i.e. has enabled voice).
|
||||
std::vector<LLUUID> speakers;
|
||||
uuid_vec_t speakers;
|
||||
get_voice_participants_uuids(speakers);
|
||||
is_valid = std::find(speakers.begin(), speakers.end(), speaker_id) != speakers.end();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ LLChatBar::LLChatBar()
|
|||
|
||||
LLChatBar::~LLChatBar()
|
||||
{
|
||||
LLGestureManager::instance().removeObserver(mObserver);
|
||||
LLGestureMgr::instance().removeObserver(mObserver);
|
||||
delete mObserver;
|
||||
mObserver = NULL;
|
||||
// LLView destructor cleans up children
|
||||
|
|
@ -209,8 +209,8 @@ void LLChatBar::refreshGestures()
|
|||
|
||||
// collect list of unique gestures
|
||||
std::map <std::string, BOOL> unique;
|
||||
LLGestureManager::item_map_t::const_iterator it;
|
||||
const LLGestureManager::item_map_t& active_gestures = LLGestureManager::instance().getActiveGestures();
|
||||
LLGestureMgr::item_map_t::const_iterator it;
|
||||
const LLGestureMgr::item_map_t& active_gestures = LLGestureMgr::instance().getActiveGestures();
|
||||
for (it = active_gestures.begin(); it != active_gestures.end(); ++it)
|
||||
{
|
||||
LLMultiGesture* gesture = (*it).second;
|
||||
|
|
@ -296,7 +296,7 @@ void LLChatBar::setGestureCombo(LLComboBox* combo)
|
|||
|
||||
// now register observer since we have a place to put the results
|
||||
mObserver = new LLChatBarGestureObserver(this);
|
||||
LLGestureManager::instance().addObserver(mObserver);
|
||||
LLGestureMgr::instance().addObserver(mObserver);
|
||||
|
||||
// refresh list from current active gestures
|
||||
refreshGestures();
|
||||
|
|
@ -377,7 +377,7 @@ void LLChatBar::sendChat( EChatType type )
|
|||
if (0 == channel)
|
||||
{
|
||||
// discard returned "found" boolean
|
||||
LLGestureManager::instance().triggerAndReviseString(utf8text, &utf8_revised_text);
|
||||
LLGestureMgr::instance().triggerAndReviseString(utf8text, &utf8_revised_text);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -516,7 +516,7 @@ void LLChatBar::onInputEditorKeystroke( LLLineEditor* caller, void* userdata )
|
|||
std::string utf8_trigger = wstring_to_utf8str(raw_text);
|
||||
std::string utf8_out_str(utf8_trigger);
|
||||
|
||||
if (LLGestureManager::instance().matchPrefix(utf8_trigger, &utf8_out_str))
|
||||
if (LLGestureMgr::instance().matchPrefix(utf8_trigger, &utf8_out_str))
|
||||
{
|
||||
if (self->mInputEditor)
|
||||
{
|
||||
|
|
@ -653,7 +653,7 @@ void LLChatBar::onCommitGesture(LLUICtrl* ctrl)
|
|||
// substitution and logging.
|
||||
std::string text(trigger);
|
||||
std::string revised_text;
|
||||
LLGestureManager::instance().triggerAndReviseString(text, &revised_text);
|
||||
LLGestureMgr::instance().triggerAndReviseString(text, &revised_text);
|
||||
|
||||
revised_text = utf8str_trim(revised_text);
|
||||
if (!revised_text.empty())
|
||||
|
|
|
|||
|
|
@ -118,13 +118,12 @@ void LLDriverParamInfo::toStream(std::ostream &out)
|
|||
|
||||
out << std::endl;
|
||||
|
||||
LLVOAvatarSelf *avatar = gAgent.getAvatarObject();
|
||||
if(avatar)
|
||||
if(isAgentAvatarValid())
|
||||
{
|
||||
for (entry_info_list_t::iterator iter = mDrivenInfoList.begin(); iter != mDrivenInfoList.end(); iter++)
|
||||
{
|
||||
LLDrivenEntryInfo driven = *iter;
|
||||
LLViewerVisualParam *param = (LLViewerVisualParam*)avatar->getVisualParam(driven.mDrivenID);
|
||||
LLViewerVisualParam *param = (LLViewerVisualParam*)gAgentAvatarp->getVisualParam(driven.mDrivenID);
|
||||
if (param)
|
||||
{
|
||||
param->getInfo()->toStream(out);
|
||||
|
|
@ -146,7 +145,7 @@ void LLDriverParamInfo::toStream(std::ostream &out)
|
|||
}
|
||||
else
|
||||
{
|
||||
llwarns << "could not get parameter " << driven.mDrivenID << " from avatar " << avatar << " for driver parameter " << getID() << llendl;
|
||||
llwarns << "could not get parameter " << driven.mDrivenID << " from avatar " << gAgentAvatarp << " for driver parameter " << getID() << llendl;
|
||||
}
|
||||
out << std::endl;
|
||||
}
|
||||
|
|
@ -626,13 +625,13 @@ F32 LLDriverParam::getDrivenWeight(const LLDrivenEntry* driven, F32 input_weight
|
|||
|
||||
void LLDriverParam::setDrivenWeight(LLDrivenEntry *driven, F32 driven_weight, bool upload_bake)
|
||||
{
|
||||
LLVOAvatarSelf *avatar_self = gAgent.getAvatarObject();
|
||||
if(mWearablep &&
|
||||
if(isAgentAvatarValid() &&
|
||||
mWearablep &&
|
||||
driven->mParam->getCrossWearable() &&
|
||||
mWearablep->isOnTop())
|
||||
{
|
||||
// call setWeight through LLVOAvatarSelf so other wearables can be updated with the correct values
|
||||
avatar_self->setVisualParamWeight( (LLVisualParam*)driven->mParam, driven_weight, upload_bake );
|
||||
gAgentAvatarp->setVisualParamWeight( (LLVisualParam*)driven->mParam, driven_weight, upload_bake );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -568,7 +568,7 @@ void LLFloaterAnimPreview::onBtnPlay(void* user_data)
|
|||
{
|
||||
LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
|
||||
|
||||
if(!avatarp->isMotionActive(previewp->mMotionID))
|
||||
if (!avatarp->isMotionActive(previewp->mMotionID))
|
||||
{
|
||||
previewp->resetMotion();
|
||||
previewp->mPauseRequest = NULL;
|
||||
|
|
@ -593,7 +593,7 @@ void LLFloaterAnimPreview::onBtnPause(void* user_data)
|
|||
{
|
||||
LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
|
||||
|
||||
if(avatarp->isMotionActive(previewp->mMotionID))
|
||||
if (avatarp->isMotionActive(previewp->mMotionID))
|
||||
{
|
||||
if (!avatarp->areAnimationsPaused())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ void LLFloaterAvatarPicker::onBtnFind()
|
|||
find();
|
||||
}
|
||||
|
||||
static void getSelectedAvatarData(const LLScrollListCtrl* from, std::vector<std::string>& avatar_names, std::vector<LLUUID>& avatar_ids)
|
||||
static void getSelectedAvatarData(const LLScrollListCtrl* from, std::vector<std::string>& avatar_names, uuid_vec_t& avatar_ids)
|
||||
{
|
||||
std::vector<LLScrollListItem*> items = from->getAllSelected();
|
||||
for (std::vector<LLScrollListItem*>::iterator iter = items.begin(); iter != items.end(); ++iter)
|
||||
|
|
@ -203,7 +203,7 @@ void LLFloaterAvatarPicker::onBtnSelect()
|
|||
if(list)
|
||||
{
|
||||
std::vector<std::string> avatar_names;
|
||||
std::vector<LLUUID> avatar_ids;
|
||||
uuid_vec_t avatar_ids;
|
||||
getSelectedAvatarData(list, avatar_names, avatar_ids);
|
||||
mSelectionCallback(avatar_names, avatar_ids);
|
||||
}
|
||||
|
|
@ -247,7 +247,7 @@ void LLFloaterAvatarPicker::populateNearMe()
|
|||
LLScrollListCtrl* near_me_scroller = getChild<LLScrollListCtrl>("NearMe");
|
||||
near_me_scroller->deleteAllItems();
|
||||
|
||||
std::vector<LLUUID> avatar_ids;
|
||||
uuid_vec_t avatar_ids;
|
||||
LLWorld::getInstance()->getAvatars(&avatar_ids, NULL, gAgent.getPositionGlobal(), gSavedSettings.getF32("NearMeRange"));
|
||||
for(U32 i=0; i<avatar_ids.size(); i++)
|
||||
{
|
||||
|
|
@ -499,7 +499,7 @@ bool LLFloaterAvatarPicker::isSelectBtnEnabled()
|
|||
|
||||
if(list)
|
||||
{
|
||||
std::vector<LLUUID> avatar_ids;
|
||||
uuid_vec_t avatar_ids;
|
||||
std::vector<std::string> avatar_names;
|
||||
getSelectedAvatarData(list, avatar_names, avatar_ids);
|
||||
return mOkButtonValidateSignal(avatar_ids);
|
||||
|
|
|
|||
|
|
@ -40,11 +40,11 @@
|
|||
class LLFloaterAvatarPicker : public LLFloater
|
||||
{
|
||||
public:
|
||||
typedef boost::signals2::signal<bool(const std::vector<LLUUID>&), boost_boolean_combiner> validate_signal_t;
|
||||
typedef boost::signals2::signal<bool(const uuid_vec_t&), boost_boolean_combiner> validate_signal_t;
|
||||
typedef validate_signal_t::slot_type validate_callback_t;
|
||||
|
||||
// The callback function will be called with an avatar name and UUID.
|
||||
typedef boost::function<void (const std::vector<std::string>&, const std::vector<LLUUID>&)> select_callback_t;
|
||||
typedef boost::function<void (const std::vector<std::string>&, const uuid_vec_t&)> select_callback_t;
|
||||
// Call this to select an avatar.
|
||||
static LLFloaterAvatarPicker* show(select_callback_t callback,
|
||||
BOOL allow_multiple = FALSE,
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ LLFloaterGesture::LLFloaterGesture(const LLSD& key)
|
|||
: LLFloater(key)
|
||||
{
|
||||
mObserver = new LLFloaterGestureObserver(this);
|
||||
LLGestureManager::instance().addObserver(mObserver);
|
||||
LLGestureMgr::instance().addObserver(mObserver);
|
||||
|
||||
mCommitCallbackRegistrar.add("Gesture.Action.ToogleActiveState", boost::bind(&LLFloaterGesture::onActivateBtnClick, this));
|
||||
mCommitCallbackRegistrar.add("Gesture.Action.ShowPreview", boost::bind(&LLFloaterGesture::onClickEdit, this));
|
||||
|
|
@ -125,7 +125,7 @@ void LLFloaterGesture::done()
|
|||
// we load only gesture folder without childred.
|
||||
LLInventoryModel::cat_array_t* categories;
|
||||
LLInventoryModel::item_array_t* items;
|
||||
LLInventoryFetchDescendentsObserver::folder_ref_t unloaded_folders;
|
||||
uuid_vec_t unloaded_folders;
|
||||
LL_DEBUGS("Gesture")<< "Get subdirs of Gesture Folder...." << LL_ENDL;
|
||||
gInventory.getDirectDescendentsOf(mGestureFolderID, categories, items);
|
||||
if (categories->empty())
|
||||
|
|
@ -165,7 +165,7 @@ void LLFloaterGesture::done()
|
|||
// virtual
|
||||
LLFloaterGesture::~LLFloaterGesture()
|
||||
{
|
||||
LLGestureManager::instance().removeObserver(mObserver);
|
||||
LLGestureMgr::instance().removeObserver(mObserver);
|
||||
delete mObserver;
|
||||
mObserver = NULL;
|
||||
gInventory.removeObserver(this);
|
||||
|
|
@ -197,7 +197,7 @@ BOOL LLFloaterGesture::postBuild()
|
|||
setDefaultBtn("play_btn");
|
||||
mGestureFolderID = gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE, false);
|
||||
|
||||
folder_ref_t folders;
|
||||
uuid_vec_t folders;
|
||||
folders.push_back(mGestureFolderID);
|
||||
//perform loading Gesture directory anyway to make sure that all subdirectory are loaded too. See method done() for details.
|
||||
gInventory.addObserver(this);
|
||||
|
|
@ -246,13 +246,13 @@ void LLFloaterGesture::refreshAll()
|
|||
void LLFloaterGesture::buildGestureList()
|
||||
{
|
||||
S32 scroll_pos = mGestureList->getScrollPos();
|
||||
std::vector<LLUUID> selected_items;
|
||||
uuid_vec_t selected_items;
|
||||
getSelectedIds(selected_items);
|
||||
LL_DEBUGS("Gesture")<< "Rebuilding gesture list "<< LL_ENDL;
|
||||
mGestureList->deleteAllItems();
|
||||
|
||||
LLGestureManager::item_map_t::const_iterator it;
|
||||
const LLGestureManager::item_map_t& active_gestures = LLGestureManager::instance().getActiveGestures();
|
||||
LLGestureMgr::item_map_t::const_iterator it;
|
||||
const LLGestureMgr::item_map_t& active_gestures = LLGestureMgr::instance().getActiveGestures();
|
||||
for (it = active_gestures.begin(); it != active_gestures.end(); ++it)
|
||||
{
|
||||
addGesture(it->first,it->second, mGestureList);
|
||||
|
|
@ -278,7 +278,7 @@ void LLFloaterGesture::buildGestureList()
|
|||
|
||||
// attempt to preserve scroll position through re-builds
|
||||
// since we do re-build whenever something gets dirty
|
||||
for(std::vector<LLUUID>::iterator it = selected_items.begin(); it != selected_items.end(); it++)
|
||||
for(uuid_vec_t::iterator it = selected_items.begin(); it != selected_items.end(); it++)
|
||||
{
|
||||
mGestureList->selectByID(*it);
|
||||
}
|
||||
|
|
@ -371,13 +371,13 @@ void LLFloaterGesture::addGesture(const LLUUID& item_id , LLMultiGesture* gestur
|
|||
LLScrollListItem* sl_item = list->addElement(element, ADD_BOTTOM);
|
||||
if(sl_item)
|
||||
{
|
||||
LLFontGL::StyleFlags style = LLGestureManager::getInstance()->isGestureActive(item_id) ? LLFontGL::BOLD : LLFontGL::NORMAL;
|
||||
LLFontGL::StyleFlags style = LLGestureMgr::getInstance()->isGestureActive(item_id) ? LLFontGL::BOLD : LLFontGL::NORMAL;
|
||||
// *TODO find out why ["font"]["style"] does not affect font style
|
||||
((LLScrollListText*)sl_item->getColumn(0))->setFontStyle(style);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterGesture::getSelectedIds(std::vector<LLUUID>& ids)
|
||||
void LLFloaterGesture::getSelectedIds(uuid_vec_t& ids)
|
||||
{
|
||||
std::vector<LLScrollListItem*> items = mGestureList->getAllSelected();
|
||||
for(std::vector<LLScrollListItem*>::const_iterator it = items.begin(); it != items.end(); it++)
|
||||
|
|
@ -421,17 +421,17 @@ void LLFloaterGesture::onClickPlay()
|
|||
if(item_id.isNull()) return;
|
||||
|
||||
LL_DEBUGS("Gesture")<<" Trying to play gesture id: "<< item_id <<LL_ENDL;
|
||||
if(!LLGestureManager::instance().isGestureActive(item_id))
|
||||
if(!LLGestureMgr::instance().isGestureActive(item_id))
|
||||
{
|
||||
// we need to inform server about gesture activating to be consistent with LLPreviewGesture and LLGestureComboList.
|
||||
BOOL inform_server = TRUE;
|
||||
BOOL deactivate_similar = FALSE;
|
||||
LLGestureManager::instance().setGestureLoadedCallback(item_id, boost::bind(&LLFloaterGesture::playGesture, this, item_id));
|
||||
LLGestureMgr::instance().setGestureLoadedCallback(item_id, boost::bind(&LLFloaterGesture::playGesture, this, item_id));
|
||||
LLViewerInventoryItem *item = gInventory.getItem(item_id);
|
||||
llassert(item);
|
||||
if (item)
|
||||
{
|
||||
LLGestureManager::instance().activateGestureWithAsset(item_id, item->getAssetUUID(), inform_server, deactivate_similar);
|
||||
LLGestureMgr::instance().activateGestureWithAsset(item_id, item->getAssetUUID(), inform_server, deactivate_similar);
|
||||
LL_DEBUGS("Gesture")<< "Activating gesture with inventory ID: " << item_id <<LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
|
@ -451,13 +451,13 @@ void LLFloaterGesture::onClickNew()
|
|||
|
||||
void LLFloaterGesture::onActivateBtnClick()
|
||||
{
|
||||
std::vector<LLUUID> ids;
|
||||
uuid_vec_t ids;
|
||||
getSelectedIds(ids);
|
||||
if(ids.empty())
|
||||
return;
|
||||
|
||||
LLGestureManager* gm = LLGestureManager::getInstance();
|
||||
std::vector<LLUUID>::const_iterator it = ids.begin();
|
||||
LLGestureMgr* gm = LLGestureMgr::getInstance();
|
||||
uuid_vec_t::const_iterator it = ids.begin();
|
||||
BOOL first_gesture_state = gm->isGestureActive(*it);
|
||||
BOOL is_mixed = FALSE;
|
||||
while( ++it != ids.end() )
|
||||
|
|
@ -468,7 +468,7 @@ void LLFloaterGesture::onActivateBtnClick()
|
|||
break;
|
||||
}
|
||||
}
|
||||
for(std::vector<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); it++)
|
||||
for(uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); it++)
|
||||
{
|
||||
if(is_mixed)
|
||||
{
|
||||
|
|
@ -494,11 +494,11 @@ void LLFloaterGesture::onCopyPasteAction(const LLSD& command)
|
|||
// since we select this comman inventory item had already arrived .
|
||||
if("copy_gesture" == command_name)
|
||||
{
|
||||
std::vector<LLUUID> ids;
|
||||
uuid_vec_t ids;
|
||||
getSelectedIds(ids);
|
||||
// make sure that clopboard is empty
|
||||
LLInventoryClipboard::instance().reset();
|
||||
for(std::vector<LLUUID>::iterator it = ids.begin(); it != ids.end(); it++)
|
||||
for(uuid_vec_t::iterator it = ids.begin(); it != ids.end(); it++)
|
||||
{
|
||||
LLInventoryItem* item = gInventory.getItem(*it);
|
||||
if(item && item->getInventoryType() == LLInventoryType::IT_GESTURE)
|
||||
|
|
@ -558,7 +558,7 @@ void LLFloaterGesture::onCommitList()
|
|||
const LLUUID& item_id = mGestureList->getCurrentID();
|
||||
|
||||
mSelectedID = item_id;
|
||||
if (LLGestureManager::instance().isGesturePlaying(item_id))
|
||||
if (LLGestureMgr::instance().isGesturePlaying(item_id))
|
||||
{
|
||||
childSetVisible("play_btn", false);
|
||||
childSetVisible("stop_btn", true);
|
||||
|
|
@ -572,14 +572,14 @@ void LLFloaterGesture::onCommitList()
|
|||
|
||||
void LLFloaterGesture::onDeleteSelected()
|
||||
{
|
||||
std::vector<LLUUID> ids;
|
||||
uuid_vec_t ids;
|
||||
getSelectedIds(ids);
|
||||
if(ids.empty())
|
||||
return;
|
||||
|
||||
const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
|
||||
LLGestureManager* gm = LLGestureManager::getInstance();
|
||||
for(std::vector<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); it++)
|
||||
LLGestureMgr* gm = LLGestureMgr::getInstance();
|
||||
for(uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); it++)
|
||||
{
|
||||
const LLUUID& selected_item = *it;
|
||||
LLInventoryItem* inv_item = gInventory.getItem(selected_item);
|
||||
|
|
@ -610,10 +610,10 @@ void LLFloaterGesture::onDeleteSelected()
|
|||
|
||||
void LLFloaterGesture::addToCurrentOutFit()
|
||||
{
|
||||
std::vector<LLUUID> ids;
|
||||
uuid_vec_t ids;
|
||||
getSelectedIds(ids);
|
||||
LLAppearanceManager* am = LLAppearanceManager::getInstance();
|
||||
for(std::vector<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); it++)
|
||||
LLAppearanceMgr* am = LLAppearanceMgr::getInstance();
|
||||
for(uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); it++)
|
||||
{
|
||||
am->addCOFItemLink(*it);
|
||||
}
|
||||
|
|
@ -623,12 +623,12 @@ void LLFloaterGesture::playGesture(LLUUID item_id)
|
|||
{
|
||||
LL_DEBUGS("Gesture")<<"Playing gesture "<< item_id<<LL_ENDL;
|
||||
|
||||
if (LLGestureManager::instance().isGesturePlaying(item_id))
|
||||
if (LLGestureMgr::instance().isGesturePlaying(item_id))
|
||||
{
|
||||
LLGestureManager::instance().stopGesture(item_id);
|
||||
LLGestureMgr::instance().stopGesture(item_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLGestureManager::instance().playGesture(item_id);
|
||||
LLGestureMgr::instance().playGesture(item_id);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ private:
|
|||
* Therefore we have to copy these items to avoid viewer crash.
|
||||
* @see LLFloaterGesture::onActivateBtnClick
|
||||
*/
|
||||
void getSelectedIds(std::vector<LLUUID>& ids);
|
||||
void getSelectedIds(uuid_vec_t& ids);
|
||||
bool isActionEnabled(const LLSD& command);
|
||||
/**
|
||||
* @brief Activation rules:
|
||||
|
|
|
|||
|
|
@ -1150,7 +1150,7 @@ void LLPanelObjectTools::onClickSetBySelection(void* data)
|
|||
panelp->childSetValue("target_avatar_name", name);
|
||||
}
|
||||
|
||||
void LLPanelObjectTools::callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids)
|
||||
void LLPanelObjectTools::callbackAvatarID(const std::vector<std::string>& names, const uuid_vec_t& ids)
|
||||
{
|
||||
if (ids.empty() || names.empty()) return;
|
||||
mTargetAvatar = ids[0];
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ public:
|
|||
void onChangeAnything();
|
||||
void onApplyChanges();
|
||||
void onClickSet();
|
||||
void callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids);
|
||||
void callbackAvatarID(const std::vector<std::string>& names, const uuid_vec_t& ids);
|
||||
void onClickDeletePublicOwnedBy();
|
||||
void onClickDeleteAllScriptedOwnedBy();
|
||||
void onClickDeleteAllOwnedBy();
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ LLFloaterGroupInvite::~LLFloaterGroupInvite()
|
|||
}
|
||||
|
||||
// static
|
||||
void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id, std::vector<LLUUID> *agent_ids)
|
||||
void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id, uuid_vec_t *agent_ids)
|
||||
{
|
||||
const LLFloater::Params& floater_params = LLFloater::getDefaultParams();
|
||||
S32 floater_header_size = floater_params.header_height;
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class LLFloaterGroupInvite
|
|||
public:
|
||||
virtual ~LLFloaterGroupInvite();
|
||||
|
||||
static void showForGroup(const LLUUID &group_id, std::vector<LLUUID> *agent_ids = NULL);
|
||||
static void showForGroup(const LLUUID &group_id, uuid_vec_t *agent_ids = NULL);
|
||||
|
||||
protected:
|
||||
LLFloaterGroupInvite(const LLUUID& group_id = LLUUID::null);
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ void LLFloaterLagMeter::determineNetwork()
|
|||
|
||||
// *FIXME: We can't blame a large ping time on anything in
|
||||
// particular if the frame rate is low, because a low frame
|
||||
// rate is a sure recipe for crappy ping times right now until
|
||||
// rate is a sure recipe for bad ping times right now until
|
||||
// the network handlers are de-synched from the rendering.
|
||||
F32 client_frame_time_ms = 1000.0f * LLViewerStats::getInstance()->mFPSStat.getMeanDuration();
|
||||
|
||||
|
|
|
|||
|
|
@ -2774,7 +2774,7 @@ void LLPanelLandAccess::onClickAddAccess()
|
|||
gFloaterView->getParentFloater(this)->addDependentFloater(LLFloaterAvatarPicker::show(boost::bind(&LLPanelLandAccess::callbackAvatarCBAccess, this, _1,_2)) );
|
||||
}
|
||||
|
||||
void LLPanelLandAccess::callbackAvatarCBAccess(const std::vector<std::string>& names, const std::vector<LLUUID>& ids)
|
||||
void LLPanelLandAccess::callbackAvatarCBAccess(const std::vector<std::string>& names, const uuid_vec_t& ids)
|
||||
{
|
||||
if (!names.empty() && !ids.empty())
|
||||
{
|
||||
|
|
@ -2819,7 +2819,7 @@ void LLPanelLandAccess::onClickAddBanned()
|
|||
}
|
||||
|
||||
// static
|
||||
void LLPanelLandAccess::callbackAvatarCBBanned(const std::vector<std::string>& names, const std::vector<LLUUID>& ids)
|
||||
void LLPanelLandAccess::callbackAvatarCBBanned(const std::vector<std::string>& names, const uuid_vec_t& ids)
|
||||
{
|
||||
if (!names.empty() && !ids.empty())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ public:
|
|||
static void onClickSet(void* data);
|
||||
static void onClickClear(void* data);
|
||||
static void onClickShow(void* data);
|
||||
static void callbackAvatarPick(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data);
|
||||
static void callbackAvatarPick(const std::vector<std::string>& names, const uuid_vec_t& ids, void* data);
|
||||
static void finalizeAvatarPick(void* data);
|
||||
static void callbackHighlightTransferable(S32 option, void* userdata);
|
||||
static void onClickStartAuction(void*);
|
||||
|
|
@ -374,8 +374,8 @@ public:
|
|||
|
||||
void onClickAddAccess();
|
||||
void onClickAddBanned();
|
||||
void callbackAvatarCBBanned(const std::vector<std::string>& names, const std::vector<LLUUID>& ids);
|
||||
void callbackAvatarCBAccess(const std::vector<std::string>& names, const std::vector<LLUUID>& ids);
|
||||
void callbackAvatarCBBanned(const std::vector<std::string>& names, const uuid_vec_t& ids);
|
||||
void callbackAvatarCBAccess(const std::vector<std::string>& names, const uuid_vec_t& ids);
|
||||
|
||||
protected:
|
||||
LLNameListCtrl* mListAccess;
|
||||
|
|
|
|||
|
|
@ -610,7 +610,7 @@ void LLPanelRegionGeneralInfo::onClickKick()
|
|||
parent_floater->addDependentFloater(child_floater);
|
||||
}
|
||||
|
||||
void LLPanelRegionGeneralInfo::onKickCommit(const std::vector<std::string>& names, const std::vector<LLUUID>& ids)
|
||||
void LLPanelRegionGeneralInfo::onKickCommit(const std::vector<std::string>& names, const uuid_vec_t& ids)
|
||||
{
|
||||
if (names.empty() || ids.empty()) return;
|
||||
if(ids[0].notNull())
|
||||
|
|
@ -848,7 +848,7 @@ void LLPanelRegionDebugInfo::onClickChooseAvatar()
|
|||
}
|
||||
|
||||
|
||||
void LLPanelRegionDebugInfo::callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids)
|
||||
void LLPanelRegionDebugInfo::callbackAvatarID(const std::vector<std::string>& names, const uuid_vec_t& ids)
|
||||
{
|
||||
if (ids.empty() || names.empty()) return;
|
||||
mTargetAvatar = ids[0];
|
||||
|
|
@ -1531,7 +1531,7 @@ void LLPanelEstateInfo::onClickKickUser()
|
|||
parent_floater->addDependentFloater(child_floater);
|
||||
}
|
||||
|
||||
void LLPanelEstateInfo::onKickUserCommit(const std::vector<std::string>& names, const std::vector<LLUUID>& ids)
|
||||
void LLPanelEstateInfo::onKickUserCommit(const std::vector<std::string>& names, const uuid_vec_t& ids)
|
||||
{
|
||||
if (names.empty() || ids.empty()) return;
|
||||
|
||||
|
|
@ -1616,7 +1616,6 @@ bool LLPanelEstateInfo::isLindenEstate()
|
|||
return (estate_id <= ESTATE_LAST_LINDEN);
|
||||
}
|
||||
|
||||
typedef std::vector<LLUUID> AgentOrGroupIDsVector;
|
||||
struct LLEstateAccessChangeInfo
|
||||
{
|
||||
LLEstateAccessChangeInfo(const LLSD& sd)
|
||||
|
|
@ -1637,7 +1636,7 @@ struct LLEstateAccessChangeInfo
|
|||
LLSD sd;
|
||||
sd["name"] = mDialogName;
|
||||
sd["operation"] = (S32)mOperationFlag;
|
||||
for (AgentOrGroupIDsVector::const_iterator it = mAgentOrGroupIDs.begin();
|
||||
for (uuid_vec_t::const_iterator it = mAgentOrGroupIDs.begin();
|
||||
it != mAgentOrGroupIDs.end();
|
||||
++it)
|
||||
{
|
||||
|
|
@ -1648,7 +1647,7 @@ struct LLEstateAccessChangeInfo
|
|||
|
||||
U32 mOperationFlag; // ESTATE_ACCESS_BANNED_AGENT_ADD, _REMOVE, etc.
|
||||
std::string mDialogName;
|
||||
AgentOrGroupIDsVector mAgentOrGroupIDs; // List of agent IDs to apply to this change
|
||||
uuid_vec_t mAgentOrGroupIDs; // List of agent IDs to apply to this change
|
||||
};
|
||||
|
||||
// Special case callback for groups, since it has different callback format than names
|
||||
|
|
@ -1716,7 +1715,7 @@ bool LLPanelEstateInfo::accessAddCore2(const LLSD& notification, const LLSD& res
|
|||
}
|
||||
|
||||
// static
|
||||
void LLPanelEstateInfo::accessAddCore3(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data)
|
||||
void LLPanelEstateInfo::accessAddCore3(const std::vector<std::string>& names, const uuid_vec_t& ids, void* data)
|
||||
{
|
||||
LLEstateAccessChangeInfo* change_info = (LLEstateAccessChangeInfo*)data;
|
||||
if (!change_info) return;
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ public:
|
|||
protected:
|
||||
virtual BOOL sendUpdate();
|
||||
void onClickKick();
|
||||
void onKickCommit(const std::vector<std::string>& names, const std::vector<LLUUID>& ids);
|
||||
void onKickCommit(const std::vector<std::string>& names, const uuid_vec_t& ids);
|
||||
static void onClickKickAll(void* userdata);
|
||||
bool onKickAllCommit(const LLSD& notification, const LLSD& response);
|
||||
static void onClickMessage(void* userdata);
|
||||
|
|
@ -193,7 +193,7 @@ protected:
|
|||
virtual BOOL sendUpdate();
|
||||
|
||||
void onClickChooseAvatar();
|
||||
void callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids);
|
||||
void callbackAvatarID(const std::vector<std::string>& names, const uuid_vec_t& ids);
|
||||
static void onClickReturn(void *);
|
||||
bool callbackReturn(const LLSD& notification, const LLSD& response);
|
||||
static void onClickTopColliders(void*);
|
||||
|
|
@ -284,7 +284,7 @@ public:
|
|||
// Core methods for all above add/remove button clicks
|
||||
static void accessAddCore(U32 operation_flag, const std::string& dialog_name);
|
||||
static bool accessAddCore2(const LLSD& notification, const LLSD& response);
|
||||
static void accessAddCore3(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data);
|
||||
static void accessAddCore3(const std::vector<std::string>& names, const uuid_vec_t& ids, void* data);
|
||||
|
||||
static void accessRemoveCore(U32 operation_flag, const std::string& dialog_name, const std::string& list_ctrl_name);
|
||||
static bool accessRemoveCore2(const LLSD& notification, const LLSD& response);
|
||||
|
|
@ -296,7 +296,7 @@ public:
|
|||
// Send the actual EstateOwnerRequest "estateaccessdelta" message
|
||||
static void sendEstateAccessDelta(U32 flags, const LLUUID& agent_id);
|
||||
|
||||
void onKickUserCommit(const std::vector<std::string>& names, const std::vector<LLUUID>& ids);
|
||||
void onKickUserCommit(const std::vector<std::string>& names, const uuid_vec_t& ids);
|
||||
static void onClickMessageEstate(void* data);
|
||||
bool onMessageCommit(const LLSD& notification, const LLSD& response);
|
||||
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ void LLFloaterReporter::onClickSelectAbuser()
|
|||
gFloaterView->getParentFloater(this)->addDependentFloater(LLFloaterAvatarPicker::show(boost::bind(&LLFloaterReporter::callbackAvatarID, this, _1, _2), FALSE, TRUE ));
|
||||
}
|
||||
|
||||
void LLFloaterReporter::callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids)
|
||||
void LLFloaterReporter::callbackAvatarID(const std::vector<std::string>& names, const uuid_vec_t& ids)
|
||||
{
|
||||
if (ids.empty() || names.empty()) return;
|
||||
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ private:
|
|||
void setPosBox(const LLVector3d &pos);
|
||||
void enableControls(BOOL own_avatar);
|
||||
void getObjectInfo(const LLUUID& object_id);
|
||||
void callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids);
|
||||
void callbackAvatarID(const std::vector<std::string>& names, const uuid_vec_t& ids);
|
||||
void setFromAvatar(const LLUUID& avatar_id, const std::string& avatar_name = LLStringUtil::null);
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -644,7 +644,7 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content)
|
|||
std::string msg_parcels = LLTrans::getString("ScriptLimitsParcelsOwned", args_parcels);
|
||||
childSetValue("parcels_listed", LLSD(msg_parcels));
|
||||
|
||||
std::vector<LLUUID> names_requested;
|
||||
uuid_vec_t names_requested;
|
||||
|
||||
// This makes the assumption that all objects will have the same set
|
||||
// of attributes, ie they will all have, or none will have locations
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ private:
|
|||
static void doShowObjects(void *userdata);
|
||||
static bool callbackHighlightTransferable(const LLSD& notification, const LLSD& response);
|
||||
|
||||
void callbackAvatarPick(const std::vector<std::string>& names, const std::vector<LLUUID>& ids);
|
||||
void callbackAvatarPick(const std::vector<std::string>& names, const uuid_vec_t& ids);
|
||||
|
||||
public:
|
||||
virtual BOOL postBuild();
|
||||
|
|
@ -391,7 +391,7 @@ void LLFloaterSellLandUI::doSelectAgent()
|
|||
addDependentFloater(LLFloaterAvatarPicker::show(boost::bind(&LLFloaterSellLandUI::callbackAvatarPick, this, _1, _2), FALSE, TRUE));
|
||||
}
|
||||
|
||||
void LLFloaterSellLandUI::callbackAvatarPick(const std::vector<std::string>& names, const std::vector<LLUUID>& ids)
|
||||
void LLFloaterSellLandUI::callbackAvatarPick(const std::vector<std::string>& names, const uuid_vec_t& ids)
|
||||
{
|
||||
LLParcel* parcel = mParcelSelection->getParcel();
|
||||
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ void LLFloaterTopObjects::doToObjects(int action, bool all)
|
|||
LLCtrlListInterface *list = childGetListInterface("objects_list");
|
||||
if (!list || list->getItemCount() == 0) return;
|
||||
|
||||
std::vector<LLUUID>::iterator id_itor;
|
||||
uuid_vec_t::iterator id_itor;
|
||||
|
||||
bool start_message = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ private:
|
|||
std::string mMethod;
|
||||
|
||||
LLSD mObjectListData;
|
||||
std::vector<LLUUID> mObjectListIDs;
|
||||
uuid_vec_t mObjectListIDs;
|
||||
|
||||
U32 mCurrentMode;
|
||||
U32 mFlags;
|
||||
|
|
|
|||
|
|
@ -865,7 +865,7 @@ BOOL LLFolderView::getSelectionList(std::set<LLUUID> &selection) const
|
|||
BOOL LLFolderView::startDrag(LLToolDragAndDrop::ESource source)
|
||||
{
|
||||
std::vector<EDragAndDropType> types;
|
||||
std::vector<LLUUID> cargo_ids;
|
||||
uuid_vec_t cargo_ids;
|
||||
selected_items_t::iterator item_it;
|
||||
BOOL can_drag = TRUE;
|
||||
if (!mSelectedItems.empty())
|
||||
|
|
|
|||
|
|
@ -322,7 +322,7 @@ void LLFriendCardsManager::collectFriendsLists(folderid_buddies_map_t& folderBud
|
|||
if (NULL == items)
|
||||
continue;
|
||||
|
||||
std::vector<LLUUID> buddyUUIDs;
|
||||
uuid_vec_t buddyUUIDs;
|
||||
for (itBuddy = items->begin(); itBuddy != items->end(); ++itBuddy)
|
||||
{
|
||||
buddyUUIDs.push_back((*itBuddy)->getCreatorUUID());
|
||||
|
|
@ -409,7 +409,7 @@ void LLFriendCardsManager::fetchAndCheckFolderDescendents(const LLUUID& folder_i
|
|||
// This instance will be deleted in LLInitialFriendCardsFetch::done().
|
||||
LLInitialFriendCardsFetch* fetch = new LLInitialFriendCardsFetch(cb);
|
||||
|
||||
LLInventoryFetchDescendentsObserver::folder_ref_t folders;
|
||||
uuid_vec_t folders;
|
||||
folders.push_back(folder_id);
|
||||
|
||||
fetch->fetchDescendents(folders);
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class LLFriendCardsManager
|
|||
friend class CreateFriendCardCallback;
|
||||
|
||||
public:
|
||||
typedef std::map<LLUUID, std::vector<LLUUID> > folderid_buddies_map_t;
|
||||
typedef std::map<LLUUID, uuid_vec_t > folderid_buddies_map_t;
|
||||
|
||||
// LLFriendObserver implementation
|
||||
void changed(U32 mask)
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ static const LLUUID& get_linked_uuid(const LLUUID& item_id);
|
|||
|
||||
// Lightweight constructor.
|
||||
// init() does the heavy lifting.
|
||||
LLGestureManager::LLGestureManager()
|
||||
LLGestureMgr::LLGestureMgr()
|
||||
: mValid(FALSE),
|
||||
mPlaying(),
|
||||
mActive(),
|
||||
|
|
@ -79,7 +79,7 @@ LLGestureManager::LLGestureManager()
|
|||
|
||||
|
||||
// We own the data for gestures, so clean them up.
|
||||
LLGestureManager::~LLGestureManager()
|
||||
LLGestureMgr::~LLGestureMgr()
|
||||
{
|
||||
item_map_t::iterator it;
|
||||
for (it = mActive.begin(); it != mActive.end(); ++it)
|
||||
|
|
@ -93,12 +93,12 @@ LLGestureManager::~LLGestureManager()
|
|||
}
|
||||
|
||||
|
||||
void LLGestureManager::init()
|
||||
void LLGestureMgr::init()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
void LLGestureManager::changed(U32 mask)
|
||||
void LLGestureMgr::changed(U32 mask)
|
||||
{
|
||||
LLInventoryFetchObserver::changed(mask);
|
||||
|
||||
|
|
@ -136,7 +136,7 @@ void LLGestureManager::changed(U32 mask)
|
|||
|
||||
// Use this version when you have the item_id but not the asset_id,
|
||||
// and you KNOW the inventory is loaded.
|
||||
void LLGestureManager::activateGesture(const LLUUID& item_id)
|
||||
void LLGestureMgr::activateGesture(const LLUUID& item_id)
|
||||
{
|
||||
LLViewerInventoryItem* item = gInventory.getItem(item_id);
|
||||
if (!item) return;
|
||||
|
|
@ -152,7 +152,7 @@ void LLGestureManager::activateGesture(const LLUUID& item_id)
|
|||
}
|
||||
|
||||
|
||||
void LLGestureManager::activateGestures(LLViewerInventoryItem::item_array_t& items)
|
||||
void LLGestureMgr::activateGestures(LLViewerInventoryItem::item_array_t& items)
|
||||
{
|
||||
// Load up the assets
|
||||
S32 count = 0;
|
||||
|
|
@ -248,7 +248,7 @@ struct LLLoadInfo
|
|||
/**
|
||||
* It will load a gesture from remote storage
|
||||
*/
|
||||
void LLGestureManager::activateGestureWithAsset(const LLUUID& item_id,
|
||||
void LLGestureMgr::activateGestureWithAsset(const LLUUID& item_id,
|
||||
const LLUUID& asset_id,
|
||||
BOOL inform_server,
|
||||
BOOL deactivate_similar)
|
||||
|
|
@ -257,7 +257,7 @@ void LLGestureManager::activateGestureWithAsset(const LLUUID& item_id,
|
|||
|
||||
if( !gAssetStorage )
|
||||
{
|
||||
llwarns << "LLGestureManager::activateGestureWithAsset without valid gAssetStorage" << llendl;
|
||||
llwarns << "LLGestureMgr::activateGestureWithAsset without valid gAssetStorage" << llendl;
|
||||
return;
|
||||
}
|
||||
// If gesture is already active, nothing to do.
|
||||
|
|
@ -299,7 +299,7 @@ void LLGestureManager::activateGestureWithAsset(const LLUUID& item_id,
|
|||
}
|
||||
|
||||
|
||||
void LLGestureManager::deactivateGesture(const LLUUID& item_id)
|
||||
void LLGestureMgr::deactivateGesture(const LLUUID& item_id)
|
||||
{
|
||||
const LLUUID& base_item_id = get_linked_uuid(item_id);
|
||||
item_map_t::iterator it = mActive.find(base_item_id);
|
||||
|
|
@ -338,16 +338,16 @@ void LLGestureManager::deactivateGesture(const LLUUID& item_id)
|
|||
|
||||
gAgent.sendReliableMessage();
|
||||
|
||||
LLAppearanceManager::instance().removeCOFItemLinks(base_item_id, false);
|
||||
LLAppearanceMgr::instance().removeCOFItemLinks(base_item_id, false);
|
||||
|
||||
notifyObservers();
|
||||
}
|
||||
|
||||
|
||||
void LLGestureManager::deactivateSimilarGestures(LLMultiGesture* in, const LLUUID& in_item_id)
|
||||
void LLGestureMgr::deactivateSimilarGestures(LLMultiGesture* in, const LLUUID& in_item_id)
|
||||
{
|
||||
const LLUUID& base_in_item_id = get_linked_uuid(in_item_id);
|
||||
std::vector<LLUUID> gest_item_ids;
|
||||
uuid_vec_t gest_item_ids;
|
||||
|
||||
// Deactivate all gestures that match
|
||||
item_map_t::iterator it;
|
||||
|
|
@ -386,7 +386,7 @@ void LLGestureManager::deactivateSimilarGestures(LLMultiGesture* in, const LLUUI
|
|||
// Inform database of the change
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
BOOL start_message = TRUE;
|
||||
std::vector<LLUUID>::const_iterator vit = gest_item_ids.begin();
|
||||
uuid_vec_t::const_iterator vit = gest_item_ids.begin();
|
||||
while (vit != gest_item_ids.end())
|
||||
{
|
||||
if (start_message)
|
||||
|
|
@ -431,7 +431,7 @@ void LLGestureManager::deactivateSimilarGestures(LLMultiGesture* in, const LLUUI
|
|||
}
|
||||
|
||||
|
||||
BOOL LLGestureManager::isGestureActive(const LLUUID& item_id)
|
||||
BOOL LLGestureMgr::isGestureActive(const LLUUID& item_id)
|
||||
{
|
||||
const LLUUID& base_item_id = get_linked_uuid(item_id);
|
||||
item_map_t::iterator it = mActive.find(base_item_id);
|
||||
|
|
@ -439,7 +439,7 @@ BOOL LLGestureManager::isGestureActive(const LLUUID& item_id)
|
|||
}
|
||||
|
||||
|
||||
BOOL LLGestureManager::isGesturePlaying(const LLUUID& item_id)
|
||||
BOOL LLGestureMgr::isGesturePlaying(const LLUUID& item_id)
|
||||
{
|
||||
const LLUUID& base_item_id = get_linked_uuid(item_id);
|
||||
|
||||
|
|
@ -452,7 +452,7 @@ BOOL LLGestureManager::isGesturePlaying(const LLUUID& item_id)
|
|||
return gesture->mPlaying;
|
||||
}
|
||||
|
||||
BOOL LLGestureManager::isGesturePlaying(LLMultiGesture* gesture)
|
||||
BOOL LLGestureMgr::isGesturePlaying(LLMultiGesture* gesture)
|
||||
{
|
||||
if(!gesture)
|
||||
{
|
||||
|
|
@ -462,7 +462,7 @@ BOOL LLGestureManager::isGesturePlaying(LLMultiGesture* gesture)
|
|||
return gesture->mPlaying;
|
||||
}
|
||||
|
||||
void LLGestureManager::replaceGesture(const LLUUID& item_id, LLMultiGesture* new_gesture, const LLUUID& asset_id)
|
||||
void LLGestureMgr::replaceGesture(const LLUUID& item_id, LLMultiGesture* new_gesture, const LLUUID& asset_id)
|
||||
{
|
||||
const LLUUID& base_item_id = get_linked_uuid(item_id);
|
||||
|
||||
|
|
@ -504,11 +504,11 @@ void LLGestureManager::replaceGesture(const LLUUID& item_id, LLMultiGesture* new
|
|||
notifyObservers();
|
||||
}
|
||||
|
||||
void LLGestureManager::replaceGesture(const LLUUID& item_id, const LLUUID& new_asset_id)
|
||||
void LLGestureMgr::replaceGesture(const LLUUID& item_id, const LLUUID& new_asset_id)
|
||||
{
|
||||
const LLUUID& base_item_id = get_linked_uuid(item_id);
|
||||
|
||||
item_map_t::iterator it = LLGestureManager::instance().mActive.find(base_item_id);
|
||||
item_map_t::iterator it = LLGestureMgr::instance().mActive.find(base_item_id);
|
||||
if (it == mActive.end())
|
||||
{
|
||||
llwarns << "replaceGesture for inactive gesture " << base_item_id << llendl;
|
||||
|
|
@ -517,10 +517,10 @@ void LLGestureManager::replaceGesture(const LLUUID& item_id, const LLUUID& new_a
|
|||
|
||||
// mActive owns this gesture pointer, so clean up memory.
|
||||
LLMultiGesture* gesture = (*it).second;
|
||||
LLGestureManager::instance().replaceGesture(base_item_id, gesture, new_asset_id);
|
||||
LLGestureMgr::instance().replaceGesture(base_item_id, gesture, new_asset_id);
|
||||
}
|
||||
|
||||
void LLGestureManager::playGesture(LLMultiGesture* gesture)
|
||||
void LLGestureMgr::playGesture(LLMultiGesture* gesture)
|
||||
{
|
||||
if (!gesture) return;
|
||||
|
||||
|
|
@ -539,7 +539,7 @@ void LLGestureManager::playGesture(LLMultiGesture* gesture)
|
|||
|
||||
|
||||
// Convenience function that looks up the item_id for you.
|
||||
void LLGestureManager::playGesture(const LLUUID& item_id)
|
||||
void LLGestureMgr::playGesture(const LLUUID& item_id)
|
||||
{
|
||||
const LLUUID& base_item_id = get_linked_uuid(item_id);
|
||||
|
||||
|
|
@ -556,7 +556,7 @@ void LLGestureManager::playGesture(const LLUUID& item_id)
|
|||
// Iterates through space delimited tokens in string, triggering any gestures found.
|
||||
// Generates a revised string that has the found tokens replaced by their replacement strings
|
||||
// and (as a minor side effect) has multiple spaces in a row replaced by single spaces.
|
||||
BOOL LLGestureManager::triggerAndReviseString(const std::string &utf8str, std::string* revised_string)
|
||||
BOOL LLGestureMgr::triggerAndReviseString(const std::string &utf8str, std::string* revised_string)
|
||||
{
|
||||
std::string tokenized = utf8str;
|
||||
|
||||
|
|
@ -649,7 +649,7 @@ BOOL LLGestureManager::triggerAndReviseString(const std::string &utf8str, std::s
|
|||
}
|
||||
|
||||
|
||||
BOOL LLGestureManager::triggerGesture(KEY key, MASK mask)
|
||||
BOOL LLGestureMgr::triggerGesture(KEY key, MASK mask)
|
||||
{
|
||||
std::vector <LLMultiGesture *> matching;
|
||||
item_map_t::iterator it;
|
||||
|
|
@ -683,7 +683,7 @@ BOOL LLGestureManager::triggerGesture(KEY key, MASK mask)
|
|||
}
|
||||
|
||||
|
||||
S32 LLGestureManager::getPlayingCount() const
|
||||
S32 LLGestureMgr::getPlayingCount() const
|
||||
{
|
||||
return mPlaying.size();
|
||||
}
|
||||
|
|
@ -697,7 +697,7 @@ struct IsGesturePlaying : public std::unary_function<LLMultiGesture*, bool>
|
|||
}
|
||||
};
|
||||
|
||||
void LLGestureManager::update()
|
||||
void LLGestureMgr::update()
|
||||
{
|
||||
S32 i;
|
||||
for (i = 0; i < (S32)mPlaying.size(); ++i)
|
||||
|
|
@ -740,14 +740,13 @@ void LLGestureManager::update()
|
|||
|
||||
|
||||
// Run all steps until you're either done or hit a wait.
|
||||
void LLGestureManager::stepGesture(LLMultiGesture* gesture)
|
||||
void LLGestureMgr::stepGesture(LLMultiGesture* gesture)
|
||||
{
|
||||
if (!gesture)
|
||||
{
|
||||
return;
|
||||
}
|
||||
LLVOAvatar* avatar = gAgent.getAvatarObject();
|
||||
if (!avatar) return;
|
||||
if (!isAgentAvatarValid()) return;
|
||||
|
||||
// Of the ones that started playing, have any stopped?
|
||||
|
||||
|
|
@ -758,8 +757,8 @@ void LLGestureManager::stepGesture(LLMultiGesture* gesture)
|
|||
{
|
||||
// look in signaled animations (simulator's view of what is
|
||||
// currently playing.
|
||||
LLVOAvatar::AnimIterator play_it = avatar->mSignaledAnimations.find(*gest_it);
|
||||
if (play_it != avatar->mSignaledAnimations.end())
|
||||
LLVOAvatar::AnimIterator play_it = gAgentAvatarp->mSignaledAnimations.find(*gest_it);
|
||||
if (play_it != gAgentAvatarp->mSignaledAnimations.end())
|
||||
{
|
||||
++gest_it;
|
||||
}
|
||||
|
|
@ -777,8 +776,8 @@ void LLGestureManager::stepGesture(LLMultiGesture* gesture)
|
|||
gest_it != gesture->mRequestedAnimIDs.end();
|
||||
)
|
||||
{
|
||||
LLVOAvatar::AnimIterator play_it = avatar->mSignaledAnimations.find(*gest_it);
|
||||
if (play_it != avatar->mSignaledAnimations.end())
|
||||
LLVOAvatar::AnimIterator play_it = gAgentAvatarp->mSignaledAnimations.find(*gest_it);
|
||||
if (play_it != gAgentAvatarp->mSignaledAnimations.end())
|
||||
{
|
||||
// Hooray, this animation has started playing!
|
||||
// Copy into playing.
|
||||
|
|
@ -888,7 +887,7 @@ void LLGestureManager::stepGesture(LLMultiGesture* gesture)
|
|||
}
|
||||
|
||||
|
||||
void LLGestureManager::runStep(LLMultiGesture* gesture, LLGestureStep* step)
|
||||
void LLGestureMgr::runStep(LLMultiGesture* gesture, LLGestureStep* step)
|
||||
{
|
||||
switch(step->getType())
|
||||
{
|
||||
|
|
@ -975,7 +974,7 @@ void LLGestureManager::runStep(LLMultiGesture* gesture, LLGestureStep* step)
|
|||
|
||||
|
||||
// static
|
||||
void LLGestureManager::onLoadComplete(LLVFS *vfs,
|
||||
void LLGestureMgr::onLoadComplete(LLVFS *vfs,
|
||||
const LLUUID& asset_uuid,
|
||||
LLAssetType::EType type,
|
||||
void* user_data, S32 status, LLExtStat ext_status)
|
||||
|
|
@ -988,7 +987,7 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs,
|
|||
|
||||
delete info;
|
||||
info = NULL;
|
||||
LLGestureManager& self = LLGestureManager::instance();
|
||||
LLGestureMgr& self = LLGestureMgr::instance();
|
||||
self.mLoadingCount--;
|
||||
|
||||
if (0 == status)
|
||||
|
|
@ -1094,12 +1093,12 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs,
|
|||
|
||||
llwarns << "Problem loading gesture: " << status << llendl;
|
||||
|
||||
LLGestureManager::instance().mActive.erase(item_id);
|
||||
LLGestureMgr::instance().mActive.erase(item_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLGestureManager::stopGesture(LLMultiGesture* gesture)
|
||||
void LLGestureMgr::stopGesture(LLMultiGesture* gesture)
|
||||
{
|
||||
if (!gesture) return;
|
||||
|
||||
|
|
@ -1139,7 +1138,7 @@ void LLGestureManager::stopGesture(LLMultiGesture* gesture)
|
|||
}
|
||||
|
||||
|
||||
void LLGestureManager::stopGesture(const LLUUID& item_id)
|
||||
void LLGestureMgr::stopGesture(const LLUUID& item_id)
|
||||
{
|
||||
const LLUUID& base_item_id = get_linked_uuid(item_id);
|
||||
|
||||
|
|
@ -1153,12 +1152,12 @@ void LLGestureManager::stopGesture(const LLUUID& item_id)
|
|||
}
|
||||
|
||||
|
||||
void LLGestureManager::addObserver(LLGestureManagerObserver* observer)
|
||||
void LLGestureMgr::addObserver(LLGestureManagerObserver* observer)
|
||||
{
|
||||
mObservers.push_back(observer);
|
||||
}
|
||||
|
||||
void LLGestureManager::removeObserver(LLGestureManagerObserver* observer)
|
||||
void LLGestureMgr::removeObserver(LLGestureManagerObserver* observer)
|
||||
{
|
||||
std::vector<LLGestureManagerObserver*>::iterator it;
|
||||
it = std::find(mObservers.begin(), mObservers.end(), observer);
|
||||
|
|
@ -1171,9 +1170,9 @@ void LLGestureManager::removeObserver(LLGestureManagerObserver* observer)
|
|||
// Call this method when it's time to update everyone on a new state.
|
||||
// Copy the list because an observer could respond by removing itself
|
||||
// from the list.
|
||||
void LLGestureManager::notifyObservers()
|
||||
void LLGestureMgr::notifyObservers()
|
||||
{
|
||||
lldebugs << "LLGestureManager::notifyObservers" << llendl;
|
||||
lldebugs << "LLGestureMgr::notifyObservers" << llendl;
|
||||
|
||||
std::vector<LLGestureManagerObserver*> observers = mObservers;
|
||||
|
||||
|
|
@ -1185,7 +1184,7 @@ void LLGestureManager::notifyObservers()
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLGestureManager::matchPrefix(const std::string& in_str, std::string* out_str)
|
||||
BOOL LLGestureMgr::matchPrefix(const std::string& in_str, std::string* out_str)
|
||||
{
|
||||
S32 in_len = in_str.length();
|
||||
|
||||
|
|
@ -1216,7 +1215,7 @@ BOOL LLGestureManager::matchPrefix(const std::string& in_str, std::string* out_s
|
|||
}
|
||||
|
||||
|
||||
void LLGestureManager::getItemIDs(std::vector<LLUUID>* ids)
|
||||
void LLGestureMgr::getItemIDs(uuid_vec_t* ids)
|
||||
{
|
||||
item_map_t::const_iterator it;
|
||||
for (it = mActive.begin(); it != mActive.end(); ++it)
|
||||
|
|
@ -1225,7 +1224,7 @@ void LLGestureManager::getItemIDs(std::vector<LLUUID>* ids)
|
|||
}
|
||||
}
|
||||
|
||||
void LLGestureManager::done()
|
||||
void LLGestureMgr::done()
|
||||
{
|
||||
bool notify = false;
|
||||
for(item_map_t::iterator it = mActive.begin(); it != mActive.end(); ++it)
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public:
|
|||
virtual void changed() = 0;
|
||||
};
|
||||
|
||||
class LLGestureManager : public LLSingleton<LLGestureManager>, public LLInventoryFetchObserver
|
||||
class LLGestureMgr : public LLSingleton<LLGestureMgr>, public LLInventoryFetchObserver
|
||||
{
|
||||
public:
|
||||
|
||||
|
|
@ -63,8 +63,8 @@ public:
|
|||
typedef std::map<LLUUID, LLMultiGesture*> item_map_t;
|
||||
typedef std::map<LLUUID, gesture_loaded_callback_t> callback_map_t;
|
||||
|
||||
LLGestureManager();
|
||||
~LLGestureManager();
|
||||
LLGestureMgr();
|
||||
~LLGestureMgr();
|
||||
|
||||
void init();
|
||||
|
||||
|
|
@ -146,7 +146,7 @@ public:
|
|||
BOOL matchPrefix(const std::string& in_str, std::string* out_str);
|
||||
|
||||
// Copy item ids into the vector
|
||||
void getItemIDs(std::vector<LLUUID>* ids);
|
||||
void getItemIDs(uuid_vec_t* ids);
|
||||
|
||||
protected:
|
||||
// Handle the processing of a single gesture
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ LLGroupRoleData::~LLGroupRoleData()
|
|||
{
|
||||
}
|
||||
|
||||
S32 LLGroupRoleData::getMembersInRole(std::vector<LLUUID> members,
|
||||
S32 LLGroupRoleData::getMembersInRole(uuid_vec_t members,
|
||||
BOOL needs_sort)
|
||||
{
|
||||
if (mRoleID.isNull())
|
||||
|
|
@ -184,8 +184,8 @@ S32 LLGroupRoleData::getMembersInRole(std::vector<LLUUID> members,
|
|||
|
||||
// Return the number of members in the intersection.
|
||||
S32 max_size = llmin( members.size(), mMemberIDs.size() );
|
||||
std::vector<LLUUID> in_role( max_size );
|
||||
std::vector<LLUUID>::iterator in_role_end;
|
||||
uuid_vec_t in_role( max_size );
|
||||
uuid_vec_t::iterator in_role_end;
|
||||
in_role_end = std::set_intersection(mMemberIDs.begin(), mMemberIDs.end(),
|
||||
members.begin(), members.end(),
|
||||
in_role.begin());
|
||||
|
|
@ -200,7 +200,7 @@ void LLGroupRoleData::addMember(const LLUUID& member)
|
|||
|
||||
bool LLGroupRoleData::removeMember(const LLUUID& member)
|
||||
{
|
||||
std::vector<LLUUID>::iterator it = std::find(mMemberIDs.begin(),mMemberIDs.end(),member);
|
||||
uuid_vec_t::iterator it = std::find(mMemberIDs.begin(),mMemberIDs.end(),member);
|
||||
|
||||
if (it != mMemberIDs.end())
|
||||
{
|
||||
|
|
@ -1736,7 +1736,7 @@ void LLGroupMgr::sendGroupMemberInvites(const LLUUID& group_id, std::map<LLUUID,
|
|||
|
||||
//static
|
||||
void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id,
|
||||
std::vector<LLUUID>& member_ids)
|
||||
uuid_vec_t& member_ids)
|
||||
{
|
||||
bool start_message = true;
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
|
|
@ -1746,7 +1746,7 @@ void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id,
|
|||
LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id);
|
||||
if (!group_datap) return;
|
||||
|
||||
for (std::vector<LLUUID>::iterator it = member_ids.begin();
|
||||
for (uuid_vec_t::iterator it = member_ids.begin();
|
||||
it != member_ids.end(); ++it)
|
||||
{
|
||||
LLUUID& ejected_member_id = (*it);
|
||||
|
|
|
|||
|
|
@ -139,8 +139,8 @@ public:
|
|||
|
||||
const LLUUID& getID() const { return mRoleID; }
|
||||
|
||||
const std::vector<LLUUID>& getRoleMembers() const { return mMemberIDs; }
|
||||
S32 getMembersInRole(std::vector<LLUUID> members, BOOL needs_sort = TRUE);
|
||||
const uuid_vec_t& getRoleMembers() const { return mMemberIDs; }
|
||||
S32 getMembersInRole(uuid_vec_t members, BOOL needs_sort = TRUE);
|
||||
S32 getTotalMembersInRole() { return mMemberIDs.size(); }
|
||||
|
||||
LLRoleData getRoleData() const { return mRoleData; }
|
||||
|
|
@ -150,10 +150,10 @@ public:
|
|||
bool removeMember(const LLUUID& member);
|
||||
void clearMembers();
|
||||
|
||||
const std::vector<LLUUID>::const_iterator getMembersBegin() const
|
||||
const uuid_vec_t::const_iterator getMembersBegin() const
|
||||
{ return mMemberIDs.begin(); }
|
||||
|
||||
const std::vector<LLUUID>::const_iterator getMembersEnd() const
|
||||
const uuid_vec_t::const_iterator getMembersEnd() const
|
||||
{ return mMemberIDs.end(); }
|
||||
|
||||
|
||||
|
|
@ -164,7 +164,7 @@ protected:
|
|||
LLUUID mRoleID;
|
||||
LLRoleData mRoleData;
|
||||
|
||||
std::vector<LLUUID> mMemberIDs;
|
||||
uuid_vec_t mMemberIDs;
|
||||
S32 mMemberCount;
|
||||
|
||||
private:
|
||||
|
|
@ -340,7 +340,7 @@ public:
|
|||
static void sendGroupMemberJoin(const LLUUID& group_id);
|
||||
static void sendGroupMemberInvites(const LLUUID& group_id, std::map<LLUUID,LLUUID>& role_member_pairs);
|
||||
static void sendGroupMemberEjects(const LLUUID& group_id,
|
||||
std::vector<LLUUID>& member_ids);
|
||||
uuid_vec_t& member_ids);
|
||||
|
||||
void cancelGroupRoleChanges(const LLUUID& group_id);
|
||||
|
||||
|
|
|
|||
|
|
@ -922,7 +922,7 @@ BOOL LLIMFloater::dropCallingCard(LLInventoryItem* item, BOOL drop)
|
|||
{
|
||||
if(drop)
|
||||
{
|
||||
std::vector<LLUUID> ids;
|
||||
uuid_vec_t ids;
|
||||
ids.push_back(item->getCreatorUUID());
|
||||
inviteToSession(ids);
|
||||
}
|
||||
|
|
@ -955,7 +955,7 @@ BOOL LLIMFloater::dropCategory(LLInventoryCategory* category, BOOL drop)
|
|||
}
|
||||
else if(drop)
|
||||
{
|
||||
std::vector<LLUUID> ids;
|
||||
uuid_vec_t ids;
|
||||
ids.reserve(count);
|
||||
for(S32 i = 0; i < count; ++i)
|
||||
{
|
||||
|
|
@ -992,7 +992,7 @@ private:
|
|||
LLUUID mSessionID;
|
||||
};
|
||||
|
||||
BOOL LLIMFloater::inviteToSession(const std::vector<LLUUID>& ids)
|
||||
BOOL LLIMFloater::inviteToSession(const uuid_vec_t& ids)
|
||||
{
|
||||
LLViewerRegion* region = gAgent.getRegion();
|
||||
if (!region)
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ private:
|
|||
BOOL dropCategory(LLInventoryCategory* category, BOOL drop);
|
||||
|
||||
BOOL isInviteAllowed() const;
|
||||
BOOL inviteToSession(const std::vector<LLUUID>& agent_ids);
|
||||
BOOL inviteToSession(const uuid_vec_t& agent_ids);
|
||||
|
||||
static void onInputEditorFocusReceived( LLFocusableElement* caller, void* userdata );
|
||||
static void onInputEditorFocusLost(LLFocusableElement* caller, void* userdata);
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ LLIMModel::LLIMModel()
|
|||
addNewMsgCallback(toast_callback);
|
||||
}
|
||||
|
||||
LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, const std::vector<LLUUID>& ids, bool voice)
|
||||
LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, const uuid_vec_t& ids, bool voice)
|
||||
: mSessionID(session_id),
|
||||
mName(name),
|
||||
mType(type),
|
||||
|
|
@ -444,7 +444,7 @@ LLIMModel::LLIMSession* LLIMModel::findIMSession(const LLUUID& session_id) const
|
|||
}
|
||||
|
||||
//*TODO consider switching to using std::set instead of std::list for holding LLUUIDs across the whole code
|
||||
LLIMModel::LLIMSession* LLIMModel::findAdHocIMSession(const std::vector<LLUUID>& ids)
|
||||
LLIMModel::LLIMSession* LLIMModel::findAdHocIMSession(const uuid_vec_t& ids)
|
||||
{
|
||||
S32 num = ids.size();
|
||||
if (!num) return NULL;
|
||||
|
|
@ -461,7 +461,7 @@ LLIMModel::LLIMSession* LLIMModel::findAdHocIMSession(const std::vector<LLUUID>&
|
|||
|
||||
std::list<LLUUID> tmp_list(session->mInitialTargetIDs.begin(), session->mInitialTargetIDs.end());
|
||||
|
||||
std::vector<LLUUID>::const_iterator iter = ids.begin();
|
||||
uuid_vec_t::const_iterator iter = ids.begin();
|
||||
while (iter != ids.end())
|
||||
{
|
||||
tmp_list.remove(*iter);
|
||||
|
|
@ -592,7 +592,7 @@ void LLIMModel::testMessages()
|
|||
|
||||
//session name should not be empty
|
||||
bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type,
|
||||
const LLUUID& other_participant_id, const std::vector<LLUUID>& ids, bool voice)
|
||||
const LLUUID& other_participant_id, const uuid_vec_t& ids, bool voice)
|
||||
{
|
||||
if (name.empty())
|
||||
{
|
||||
|
|
@ -617,7 +617,7 @@ bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, co
|
|||
|
||||
bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, bool voice)
|
||||
{
|
||||
std::vector<LLUUID> no_ids;
|
||||
uuid_vec_t no_ids;
|
||||
return newSession(session_id, name, type, other_participant_id, no_ids, voice);
|
||||
}
|
||||
|
||||
|
|
@ -1023,7 +1023,7 @@ void LLIMModel::sendMessage(const std::string& utf8_text,
|
|||
}
|
||||
else
|
||||
{
|
||||
for(std::vector<LLUUID>::iterator it = session->mInitialTargetIDs.begin();
|
||||
for(uuid_vec_t::iterator it = session->mInitialTargetIDs.begin();
|
||||
it!=session->mInitialTargetIDs.end();++it)
|
||||
{
|
||||
const LLUUID id = *it;
|
||||
|
|
@ -1155,7 +1155,7 @@ private:
|
|||
bool LLIMModel::sendStartSession(
|
||||
const LLUUID& temp_session_id,
|
||||
const LLUUID& other_participant_id,
|
||||
const std::vector<LLUUID>& ids,
|
||||
const uuid_vec_t& ids,
|
||||
EInstantMessage dialog)
|
||||
{
|
||||
if ( dialog == IM_SESSION_GROUP_START )
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public:
|
|||
} SType;
|
||||
|
||||
LLIMSession(const LLUUID& session_id, const std::string& name,
|
||||
const EInstantMessage& type, const LLUUID& other_participant_id, const std::vector<LLUUID>& ids, bool voice);
|
||||
const EInstantMessage& type, const LLUUID& other_participant_id, const uuid_vec_t& ids, bool voice);
|
||||
virtual ~LLIMSession();
|
||||
|
||||
void sessionInitReplyReceived(const LLUUID& new_session_id);
|
||||
|
|
@ -111,7 +111,7 @@ public:
|
|||
EInstantMessage mType;
|
||||
SType mSessionType;
|
||||
LLUUID mOtherParticipantID;
|
||||
std::vector<LLUUID> mInitialTargetIDs;
|
||||
uuid_vec_t mInitialTargetIDs;
|
||||
std::string mHistoryFileName;
|
||||
|
||||
// connection to voice channel state change signal
|
||||
|
|
@ -170,7 +170,7 @@ public:
|
|||
* Find an Ad-Hoc IM Session with specified participants
|
||||
* @return first found Ad-Hoc session or NULL if the session does not exist
|
||||
*/
|
||||
LLIMSession* findAdHocIMSession(const std::vector<LLUUID>& ids);
|
||||
LLIMSession* findAdHocIMSession(const uuid_vec_t& ids);
|
||||
|
||||
/**
|
||||
* Rebind session data to a new session id.
|
||||
|
|
@ -185,7 +185,7 @@ public:
|
|||
* @param name session name should not be empty, will return false if empty
|
||||
*/
|
||||
bool newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id,
|
||||
const std::vector<LLUUID>& ids, bool voice = false);
|
||||
const uuid_vec_t& ids, bool voice = false);
|
||||
|
||||
bool newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type,
|
||||
const LLUUID& other_participant_id, bool voice = false);
|
||||
|
|
@ -273,7 +273,7 @@ public:
|
|||
|
||||
static void sendLeaveSession(const LLUUID& session_id, const LLUUID& other_participant_id);
|
||||
static bool sendStartSession(const LLUUID& temp_session_id, const LLUUID& other_participant_id,
|
||||
const std::vector<LLUUID>& ids, EInstantMessage dialog);
|
||||
const uuid_vec_t& ids, EInstantMessage dialog);
|
||||
static void sendTypingState(LLUUID session_id, LLUUID other_participant_id, BOOL typing);
|
||||
static void sendMessage(const std::string& utf8_text, const LLUUID& im_session_id,
|
||||
const LLUUID& other_participant_id, EInstantMessage dialog);
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ BOOL LLInvFVBridge::isItemRemovable() const
|
|||
}
|
||||
|
||||
// Disable delete from COF folder; have users explicitly choose "detach/take off".
|
||||
if (LLAppearanceManager::instance().getIsProtectedCOFItem(mUUID))
|
||||
if (LLAppearanceMgr::instance().getIsProtectedCOFItem(mUUID))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -260,7 +260,7 @@ void LLInvFVBridge::removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batc
|
|||
{
|
||||
if(LLAssetType::AT_GESTURE == item->getType())
|
||||
{
|
||||
LLGestureManager::instance().deactivateGesture(item->getUUID());
|
||||
LLGestureMgr::instance().deactivateGesture(item->getUUID());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -276,7 +276,7 @@ void LLInvFVBridge::removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batc
|
|||
{
|
||||
if(LLAssetType::AT_GESTURE == descendent_items[j]->getType())
|
||||
{
|
||||
LLGestureManager::instance().deactivateGesture(descendent_items[j]->getUUID());
|
||||
LLGestureMgr::instance().deactivateGesture(descendent_items[j]->getUUID());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -297,7 +297,7 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener*
|
|||
LLMessageSystem* msg = gMessageSystem;
|
||||
const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
|
||||
LLViewerInventoryItem* item = NULL;
|
||||
std::vector<LLUUID> move_ids;
|
||||
uuid_vec_t move_ids;
|
||||
LLInventoryModel::update_map_t update;
|
||||
bool start_new_message = true;
|
||||
S32 count = batch.count();
|
||||
|
|
@ -398,8 +398,8 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener*
|
|||
}
|
||||
|
||||
// move everything.
|
||||
std::vector<LLUUID>::iterator it = move_ids.begin();
|
||||
std::vector<LLUUID>::iterator end = move_ids.end();
|
||||
uuid_vec_t::iterator it = move_ids.begin();
|
||||
uuid_vec_t::iterator end = move_ids.end();
|
||||
for(; it != end; ++it)
|
||||
{
|
||||
gInventory.moveObject((*it), trash_id);
|
||||
|
|
@ -802,7 +802,7 @@ BOOL LLInvFVBridge::isAgentInventory() const
|
|||
|
||||
BOOL LLInvFVBridge::isCOFFolder() const
|
||||
{
|
||||
return LLAppearanceManager::instance().getIsInCOF(mUUID);
|
||||
return LLAppearanceMgr::instance().getIsInCOF(mUUID);
|
||||
}
|
||||
|
||||
BOOL LLInvFVBridge::isItemPermissive() const
|
||||
|
|
@ -1506,11 +1506,7 @@ BOOL LLFolderBridge::isItemRemovable() const
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
if(!avatarp)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (!isAgentAvatarValid()) return FALSE;
|
||||
|
||||
LLInventoryCategory* category = model->getCategory(mUUID);
|
||||
if(!category)
|
||||
|
|
@ -1661,8 +1657,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
|
|||
LLInventoryModel* model = getInventoryModel();
|
||||
if(!model) return FALSE;
|
||||
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
if(!avatarp) return FALSE;
|
||||
if (!isAgentAvatarValid()) return FALSE;
|
||||
|
||||
// cannot drag categories into library
|
||||
if(!isAgentInventory())
|
||||
|
|
@ -1748,9 +1743,9 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
|
|||
{
|
||||
LLInventoryItem* item = descendent_items[i];
|
||||
if (item->getType() == LLAssetType::AT_GESTURE
|
||||
&& LLGestureManager::instance().isGestureActive(item->getUUID()))
|
||||
&& LLGestureMgr::instance().isGestureActive(item->getUUID()))
|
||||
{
|
||||
LLGestureManager::instance().deactivateGesture(item->getUUID());
|
||||
LLGestureMgr::instance().deactivateGesture(item->getUUID());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1763,7 +1758,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
|
|||
{
|
||||
// traverse category and add all contents to currently worn.
|
||||
BOOL append = true;
|
||||
LLAppearanceManager::instance().wearInventoryCategory(inv_cat, false, append);
|
||||
LLAppearanceMgr::instance().wearInventoryCategory(inv_cat, false, append);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1771,7 +1766,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
|
|||
LLInventoryModel::cat_array_t cats;
|
||||
LLInventoryModel::item_array_t items;
|
||||
gInventory.collectDescendents(inv_cat->getUUID(), cats, items, LLInventoryModel::EXCLUDE_TRASH);
|
||||
LLAppearanceManager::instance().linkAll(mUUID,items,NULL);
|
||||
LLAppearanceMgr::instance().linkAll(mUUID,items,NULL);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -1780,7 +1775,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
|
|||
// BAP - should skip if dup.
|
||||
if (move_is_into_current_outfit)
|
||||
{
|
||||
LLAppearanceManager::instance().addEnsembleLink(inv_cat);
|
||||
LLAppearanceMgr::instance().addEnsembleLink(inv_cat);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2138,7 +2133,7 @@ void LLInventoryCopyAndWearObserver::changed(U32 mask)
|
|||
mContentsCount)
|
||||
{
|
||||
gInventory.removeObserver(this);
|
||||
LLAppearanceManager::instance().wearInventoryCategory(category, FALSE, TRUE);
|
||||
LLAppearanceMgr::instance().wearInventoryCategory(category, FALSE, TRUE);
|
||||
delete this;
|
||||
}
|
||||
}
|
||||
|
|
@ -2188,7 +2183,7 @@ void LLFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model
|
|||
if(!model) return;
|
||||
LLViewerInventoryCategory* cat = getCategory();
|
||||
if(!cat) return;
|
||||
LLAppearanceManager::instance().addEnsembleLink(cat,true);
|
||||
LLAppearanceMgr::instance().addEnsembleLink(cat,true);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
|
@ -2418,9 +2413,9 @@ bool LLFolderBridge::removeItemResponse(const LLSD& notification, const LLSD& re
|
|||
const LLViewerInventoryItem* item = (*iter);
|
||||
const LLUUID& item_id = item->getUUID();
|
||||
if (item->getType() == LLAssetType::AT_GESTURE
|
||||
&& LLGestureManager::instance().isGestureActive(item_id))
|
||||
&& LLGestureMgr::instance().isGestureActive(item_id))
|
||||
{
|
||||
LLGestureManager::instance().deactivateGesture(item_id);
|
||||
LLGestureMgr::instance().deactivateGesture(item_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2723,7 +2718,7 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
|||
|
||||
addDeleteContextMenuOptions(mItems, mDisabledItems);
|
||||
// EXT-4030: disallow deletion of currently worn outfit
|
||||
const LLViewerInventoryItem *base_outfit_link = LLAppearanceManager::instance().getBaseOutfitLink();
|
||||
const LLViewerInventoryItem *base_outfit_link = LLAppearanceMgr::instance().getBaseOutfitLink();
|
||||
if (base_outfit_link && (cat == base_outfit_link->getLinkedCategory()))
|
||||
{
|
||||
mDisabledItems.push_back(std::string("Delete"));
|
||||
|
|
@ -2755,7 +2750,7 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
|||
sSelf = this;
|
||||
LLRightClickInventoryFetchDescendentsObserver* fetch = new LLRightClickInventoryFetchDescendentsObserver(FALSE);
|
||||
|
||||
LLInventoryFetchDescendentsObserver::folder_ref_t folders;
|
||||
uuid_vec_t folders;
|
||||
LLViewerInventoryCategory* category = (LLViewerInventoryCategory*)model->getCategory(mUUID);
|
||||
if (category)
|
||||
{
|
||||
|
|
@ -2971,7 +2966,7 @@ void LLFolderBridge::modifyOutfit(BOOL append)
|
|||
LLViewerInventoryCategory* cat = getCategory();
|
||||
if(!cat) return;
|
||||
|
||||
LLAppearanceManager::instance().wearInventoryCategory( cat, FALSE, append );
|
||||
LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, append );
|
||||
}
|
||||
|
||||
// helper stuff
|
||||
|
|
@ -3026,8 +3021,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
if(!avatarp) return FALSE;
|
||||
if (!isAgentAvatarValid()) return FALSE;
|
||||
|
||||
LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource();
|
||||
BOOL accept = FALSE;
|
||||
|
|
@ -3049,7 +3043,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
|
|||
const LLUUID current_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
|
||||
const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
|
||||
const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
|
||||
const BOOL move_is_outof_current_outfit = LLAppearanceManager::instance().getIsInCOF(inv_item->getUUID());
|
||||
const BOOL move_is_outof_current_outfit = LLAppearanceMgr::instance().getIsInCOF(inv_item->getUUID());
|
||||
|
||||
// Can't explicitly drag things out of the COF.
|
||||
if (move_is_outof_current_outfit)
|
||||
|
|
@ -3081,9 +3075,9 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
|
|||
if(accept && drop)
|
||||
{
|
||||
if (inv_item->getType() == LLAssetType::AT_GESTURE
|
||||
&& LLGestureManager::instance().isGestureActive(inv_item->getUUID()) && move_is_into_trash)
|
||||
&& LLGestureMgr::instance().isGestureActive(inv_item->getUUID()) && move_is_into_trash)
|
||||
{
|
||||
LLGestureManager::instance().deactivateGesture(inv_item->getUUID());
|
||||
LLGestureMgr::instance().deactivateGesture(inv_item->getUUID());
|
||||
}
|
||||
// If an item is being dragged between windows, unselect
|
||||
// everything in the active window so that we don't follow
|
||||
|
|
@ -3136,7 +3130,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
|
|||
// BAP - should skip if dup.
|
||||
if (move_is_into_current_outfit)
|
||||
{
|
||||
LLAppearanceManager::instance().addCOFItemLink(inv_item);
|
||||
LLAppearanceMgr::instance().addCOFItemLink(inv_item);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -3795,7 +3789,7 @@ LLUIImagePtr LLGestureBridge::getIcon() const
|
|||
|
||||
LLFontGL::StyleFlags LLGestureBridge::getLabelStyle() const
|
||||
{
|
||||
if( LLGestureManager::instance().isGestureActive(mUUID) )
|
||||
if( LLGestureMgr::instance().isGestureActive(mUUID) )
|
||||
{
|
||||
return LLFontGL::BOLD;
|
||||
}
|
||||
|
|
@ -3807,7 +3801,7 @@ LLFontGL::StyleFlags LLGestureBridge::getLabelStyle() const
|
|||
|
||||
std::string LLGestureBridge::getLabelSuffix() const
|
||||
{
|
||||
if( LLGestureManager::instance().isGestureActive(mUUID) )
|
||||
if( LLGestureMgr::instance().isGestureActive(mUUID) )
|
||||
{
|
||||
LLStringUtil::format_map_t args;
|
||||
args["[GESLABEL]"] = LLItemBridge::getLabelSuffix();
|
||||
|
|
@ -3824,7 +3818,7 @@ void LLGestureBridge::performAction(LLFolderView* folder, LLInventoryModel* mode
|
|||
{
|
||||
if (isAddAction(action))
|
||||
{
|
||||
LLGestureManager::instance().activateGesture(mUUID);
|
||||
LLGestureMgr::instance().activateGesture(mUUID);
|
||||
|
||||
LLViewerInventoryItem* item = gInventory.getItem(mUUID);
|
||||
if (!item) return;
|
||||
|
|
@ -3836,7 +3830,7 @@ void LLGestureBridge::performAction(LLFolderView* folder, LLInventoryModel* mode
|
|||
}
|
||||
else if (isRemoveAction(action))
|
||||
{
|
||||
LLGestureManager::instance().deactivateGesture(mUUID);
|
||||
LLGestureMgr::instance().deactivateGesture(mUUID);
|
||||
|
||||
LLViewerInventoryItem* item = gInventory.getItem(mUUID);
|
||||
if (!item) return;
|
||||
|
|
@ -3848,17 +3842,17 @@ void LLGestureBridge::performAction(LLFolderView* folder, LLInventoryModel* mode
|
|||
}
|
||||
else if("play" == action)
|
||||
{
|
||||
if(!LLGestureManager::instance().isGestureActive(mUUID))
|
||||
if(!LLGestureMgr::instance().isGestureActive(mUUID))
|
||||
{
|
||||
// we need to inform server about gesture activating to be consistent with LLPreviewGesture and LLGestureComboList.
|
||||
BOOL inform_server = TRUE;
|
||||
BOOL deactivate_similar = FALSE;
|
||||
LLGestureManager::instance().setGestureLoadedCallback(mUUID, boost::bind(&LLGestureBridge::playGesture, mUUID));
|
||||
LLGestureMgr::instance().setGestureLoadedCallback(mUUID, boost::bind(&LLGestureBridge::playGesture, mUUID));
|
||||
LLViewerInventoryItem* item = gInventory.getItem(mUUID);
|
||||
llassert(item);
|
||||
if (item)
|
||||
{
|
||||
LLGestureManager::instance().activateGestureWithAsset(mUUID, item->getAssetUUID(), inform_server, deactivate_similar);
|
||||
LLGestureMgr::instance().activateGestureWithAsset(mUUID, item->getAssetUUID(), inform_server, deactivate_similar);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -3900,7 +3894,7 @@ BOOL LLGestureBridge::removeItem()
|
|||
|
||||
// This will also force close the preview window, if it exists.
|
||||
// This may actually delete *this, if mUUID is in the COF.
|
||||
LLGestureManager::instance().deactivateGesture(item_id);
|
||||
LLGestureMgr::instance().deactivateGesture(item_id);
|
||||
|
||||
// If deactivateGesture deleted *this, then return out immediately.
|
||||
if (!model->getObject(item_id))
|
||||
|
|
@ -3933,7 +3927,7 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
|||
getClipboardEntries(true, items, disabled_items, flags);
|
||||
|
||||
items.push_back(std::string("Gesture Separator"));
|
||||
if (LLGestureManager::instance().isGestureActive(getUUID()))
|
||||
if (LLGestureMgr::instance().isGestureActive(getUUID()))
|
||||
{
|
||||
items.push_back(std::string("Deactivate"));
|
||||
}
|
||||
|
|
@ -3948,13 +3942,13 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
|||
// static
|
||||
void LLGestureBridge::playGesture(const LLUUID& item_id)
|
||||
{
|
||||
if (LLGestureManager::instance().isGesturePlaying(item_id))
|
||||
if (LLGestureMgr::instance().isGesturePlaying(item_id))
|
||||
{
|
||||
LLGestureManager::instance().stopGesture(item_id);
|
||||
LLGestureMgr::instance().stopGesture(item_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLGestureManager::instance().playGesture(item_id);
|
||||
LLGestureMgr::instance().playGesture(item_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4155,8 +4149,7 @@ std::string LLObjectBridge::getLabelSuffix() const
|
|||
{
|
||||
if (get_is_item_worn(mUUID))
|
||||
{
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
std::string attachment_point_name = avatarp->getAttachedPointName(mUUID);
|
||||
std::string attachment_point_name = gAgentAvatarp->getAttachedPointName(mUUID);
|
||||
|
||||
// e.g. "(worn on ...)" / "(attached to ...)"
|
||||
LLStringUtil::format_map_t args;
|
||||
|
|
@ -4175,10 +4168,10 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach
|
|||
payload["item_id"] = item->getLinkedUUID(); // Wear the base object in case this is a link.
|
||||
|
||||
S32 attach_pt = 0;
|
||||
if (gAgent.getAvatarObject() && attachment)
|
||||
if (isAgentAvatarValid() && attachment)
|
||||
{
|
||||
for (LLVOAvatar::attachment_map_t::iterator iter = gAgent.getAvatarObject()->mAttachmentPoints.begin();
|
||||
iter != gAgent.getAvatarObject()->mAttachmentPoints.end(); ++iter)
|
||||
for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin();
|
||||
iter != gAgentAvatarp->mAttachmentPoints.end(); ++iter)
|
||||
{
|
||||
if (iter->second == attachment)
|
||||
{
|
||||
|
|
@ -4204,9 +4197,7 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach
|
|||
|
||||
bool confirm_replace_attachment_rez(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
LLVOAvatar *avatarp = gAgent.getAvatarObject();
|
||||
|
||||
if (!avatarp->canAttachMoreObjects())
|
||||
if (!gAgentAvatarp->canAttachMoreObjects())
|
||||
{
|
||||
LLSD args;
|
||||
args["MAX_ATTACHMENTS"] = llformat("%d", MAX_AGENT_ATTACHMENTS);
|
||||
|
|
@ -4268,11 +4259,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
|||
LLInventoryItem *item = getItem();
|
||||
if(item)
|
||||
{
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
if( !avatarp )
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!isAgentAvatarValid()) return;
|
||||
|
||||
if( get_is_item_worn( mUUID ) )
|
||||
{
|
||||
|
|
@ -4288,7 +4275,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
|||
// commented out for DEV-32347
|
||||
//items.push_back(std::string("Restore to Last Position"));
|
||||
|
||||
if (!avatarp->canAttachMoreObjects())
|
||||
if (!gAgentAvatarp->canAttachMoreObjects())
|
||||
{
|
||||
disabled_items.push_back(std::string("Object Wear"));
|
||||
disabled_items.push_back(std::string("Attach To"));
|
||||
|
|
@ -4296,15 +4283,14 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
|||
}
|
||||
LLMenuGL* attach_menu = menu.findChildMenuByName("Attach To", TRUE);
|
||||
LLMenuGL* attach_hud_menu = menu.findChildMenuByName("Attach To HUD", TRUE);
|
||||
LLVOAvatar *avatarp = gAgent.getAvatarObject();
|
||||
if (attach_menu
|
||||
&& (attach_menu->getChildCount() == 0)
|
||||
&& attach_hud_menu
|
||||
&& (attach_hud_menu->getChildCount() == 0)
|
||||
&& avatarp)
|
||||
&& isAgentAvatarValid())
|
||||
{
|
||||
for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin();
|
||||
iter != avatarp->mAttachmentPoints.end(); )
|
||||
for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin();
|
||||
iter != gAgentAvatarp->mAttachmentPoints.end(); )
|
||||
{
|
||||
LLVOAvatar::attachment_map_t::iterator curiter = iter++;
|
||||
LLViewerJointAttachment* attachment = curiter->second;
|
||||
|
|
@ -4354,10 +4340,9 @@ BOOL LLObjectBridge::renameItem(const std::string& new_name)
|
|||
|
||||
model->notifyObservers();
|
||||
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
if(avatarp)
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
LLViewerObject* obj = avatarp->getWornAttachment( item->getUUID() );
|
||||
LLViewerObject* obj = gAgentAvatarp->getWornAttachment( item->getUUID() );
|
||||
if(obj)
|
||||
{
|
||||
LLSelectMgr::getInstance()->deselectAll();
|
||||
|
|
@ -4410,7 +4395,7 @@ void wear_inventory_item_on_avatar( LLInventoryItem* item )
|
|||
lldebugs << "wear_inventory_item_on_avatar( " << item->getName()
|
||||
<< " )" << llendl;
|
||||
|
||||
LLAppearanceManager::instance().addCOFItemLink(item);
|
||||
LLAppearanceMgr::instance().addCOFItemLink(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4547,7 +4532,7 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_
|
|||
LLViewerInventoryItem *gest_item = gest_item_array.get(i);
|
||||
if (get_is_item_worn(gest_item->getUUID()))
|
||||
{
|
||||
LLGestureManager::instance().deactivateGesture( gest_item->getLinkedUUID() );
|
||||
LLGestureMgr::instance().deactivateGesture( gest_item->getLinkedUUID() );
|
||||
gInventory.updateItem( gest_item );
|
||||
gInventory.notifyObservers();
|
||||
}
|
||||
|
|
@ -4969,20 +4954,7 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable,
|
|||
}
|
||||
|
||||
// Find and remove this item from the COF.
|
||||
// FIXME 2.1 - call removeCOFItemLinks in llappearancemgr instead.
|
||||
LLInventoryModel::item_array_t items = gInventory.collectLinkedItems(item_id, LLAppearanceManager::instance().getCOF());
|
||||
if (items.size() != 1)
|
||||
{
|
||||
llwarns << "Found " << items.size() << " COF links to " << item_id.asString() << ", expected 1" << llendl;
|
||||
}
|
||||
for (LLInventoryModel::item_array_t::const_iterator iter = items.begin();
|
||||
iter != items.end();
|
||||
++iter)
|
||||
{
|
||||
const LLViewerInventoryItem *linked_item = (*iter);
|
||||
const LLUUID &item_id = linked_item->getUUID();
|
||||
gInventory.purgeObject(item_id);
|
||||
}
|
||||
LLAppearanceMgr::instance().removeCOFItemLinks(item_id,false);
|
||||
gInventory.notifyObservers();
|
||||
|
||||
delete on_remove_struct;
|
||||
|
|
@ -5008,20 +4980,7 @@ void LLWearableBridge::removeAllClothesFromAvatar()
|
|||
continue;
|
||||
|
||||
// Find and remove this item from the COF.
|
||||
LLInventoryModel::item_array_t items = gInventory.collectLinkedItems(
|
||||
item_id, LLAppearanceManager::instance().getCOF());
|
||||
if (items.size() != 1)
|
||||
{
|
||||
llwarns << "Found " << items.size() << " COF links to " << item_id.asString() << ", expected 1" << llendl;
|
||||
}
|
||||
for (LLInventoryModel::item_array_t::const_iterator iter = items.begin();
|
||||
iter != items.end();
|
||||
++iter)
|
||||
{
|
||||
const LLViewerInventoryItem *linked_item = (*iter);
|
||||
const LLUUID &item_id = linked_item->getUUID();
|
||||
gInventory.purgeObject(item_id);
|
||||
}
|
||||
LLAppearanceMgr::instance().removeCOFItemLinks(item_id,false);
|
||||
}
|
||||
gInventory.notifyObservers();
|
||||
|
||||
|
|
|
|||
|
|
@ -352,8 +352,7 @@ BOOL get_is_item_worn(const LLUUID& id)
|
|||
{
|
||||
case LLAssetType::AT_OBJECT:
|
||||
{
|
||||
const LLVOAvatarSelf* my_avatar = gAgent.getAvatarObject();
|
||||
if(my_avatar && my_avatar->isWearingAttachment(item->getLinkedUUID()))
|
||||
if (isAgentAvatarValid() && gAgentAvatarp->isWearingAttachment(item->getLinkedUUID()))
|
||||
return TRUE;
|
||||
break;
|
||||
}
|
||||
|
|
@ -363,7 +362,7 @@ BOOL get_is_item_worn(const LLUUID& id)
|
|||
return TRUE;
|
||||
break;
|
||||
case LLAssetType::AT_GESTURE:
|
||||
if (LLGestureManager::instance().isGestureActive(item->getLinkedUUID()))
|
||||
if (LLGestureMgr::instance().isGestureActive(item->getLinkedUUID()))
|
||||
return TRUE;
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -2595,7 +2595,7 @@ void LLInventoryModel::buildParentChildMap()
|
|||
}
|
||||
count = items.count();
|
||||
lost = 0;
|
||||
std::vector<LLUUID> lost_item_ids;
|
||||
uuid_vec_t lost_item_ids;
|
||||
for(i = 0; i < count; ++i)
|
||||
{
|
||||
LLPointer<LLViewerInventoryItem> item;
|
||||
|
|
@ -2634,7 +2634,7 @@ void LLInventoryModel::buildParentChildMap()
|
|||
LLMessageSystem* msg = gMessageSystem;
|
||||
BOOL start_new_message = TRUE;
|
||||
const LLUUID lnf = findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND);
|
||||
for(std::vector<LLUUID>::iterator it = lost_item_ids.begin() ; it < lost_item_ids.end(); ++it)
|
||||
for(uuid_vec_t::iterator it = lost_item_ids.begin() ; it < lost_item_ids.end(); ++it)
|
||||
{
|
||||
if(start_new_message)
|
||||
{
|
||||
|
|
@ -3094,7 +3094,7 @@ void LLInventoryModel::processRemoveInventoryItem(LLMessageSystem* msg, void**)
|
|||
return;
|
||||
}
|
||||
S32 count = msg->getNumberOfBlocksFast(_PREHASH_InventoryData);
|
||||
std::vector<LLUUID> item_ids;
|
||||
uuid_vec_t item_ids;
|
||||
update_map_t update;
|
||||
for(S32 i = 0; i < count; ++i)
|
||||
{
|
||||
|
|
@ -3110,7 +3110,7 @@ void LLInventoryModel::processRemoveInventoryItem(LLMessageSystem* msg, void**)
|
|||
}
|
||||
}
|
||||
gInventory.accountForUpdate(update);
|
||||
for(std::vector<LLUUID>::iterator it = item_ids.begin(); it != item_ids.end(); ++it)
|
||||
for(uuid_vec_t::iterator it = item_ids.begin(); it != item_ids.end(); ++it)
|
||||
{
|
||||
gInventory.deleteObject(*it);
|
||||
}
|
||||
|
|
@ -3190,7 +3190,7 @@ void LLInventoryModel::processRemoveInventoryFolder(LLMessageSystem* msg,
|
|||
<< llendl;
|
||||
return;
|
||||
}
|
||||
std::vector<LLUUID> folder_ids;
|
||||
uuid_vec_t folder_ids;
|
||||
update_map_t update;
|
||||
S32 count = msg->getNumberOfBlocksFast(_PREHASH_FolderData);
|
||||
for(S32 i = 0; i < count; ++i)
|
||||
|
|
@ -3204,7 +3204,7 @@ void LLInventoryModel::processRemoveInventoryFolder(LLMessageSystem* msg,
|
|||
}
|
||||
}
|
||||
gInventory.accountForUpdate(update);
|
||||
for(std::vector<LLUUID>::iterator it = folder_ids.begin(); it != folder_ids.end(); ++it)
|
||||
for(uuid_vec_t::iterator it = folder_ids.begin(); it != folder_ids.end(); ++it)
|
||||
{
|
||||
gInventory.deleteObject(*it);
|
||||
}
|
||||
|
|
@ -3317,7 +3317,7 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
|
|||
|
||||
|
||||
count = msg->getNumberOfBlocksFast(_PREHASH_ItemData);
|
||||
std::vector<LLUUID> wearable_ids;
|
||||
uuid_vec_t wearable_ids;
|
||||
item_array_t items;
|
||||
std::list<InventoryCallbackInfo> cblist;
|
||||
for(i = 0; i < count; ++i)
|
||||
|
|
@ -3774,7 +3774,6 @@ bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(LLInventoryItem* ite
|
|||
return false;
|
||||
|
||||
bool allowed = false;
|
||||
LLVOAvatarSelf* my_avatar = NULL;
|
||||
|
||||
switch(item->getType())
|
||||
{
|
||||
|
|
@ -3783,8 +3782,7 @@ bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(LLInventoryItem* ite
|
|||
break;
|
||||
|
||||
case LLAssetType::AT_OBJECT:
|
||||
my_avatar = gAgent.getAvatarObject();
|
||||
if(my_avatar && !my_avatar->isWearingAttachment(item->getUUID()))
|
||||
if (isAgentAvatarValid() && !gAgentAvatarp->isWearingAttachment(item->getUUID()))
|
||||
{
|
||||
allowed = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ void LLInventoryCompletionObserver::changed(U32 mask)
|
|||
// appropriate.
|
||||
if(!mIncomplete.empty())
|
||||
{
|
||||
for(item_ref_t::iterator it = mIncomplete.begin(); it < mIncomplete.end(); )
|
||||
for(uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end(); )
|
||||
{
|
||||
LLViewerInventoryItem* item = gInventory.getItem(*it);
|
||||
if(!item)
|
||||
|
|
@ -262,7 +262,7 @@ void LLInventoryFetchObserver::fetchItems(
|
|||
// virtual
|
||||
void LLInventoryFetchDescendentsObserver::changed(U32 mask)
|
||||
{
|
||||
for(folder_ref_t::iterator it = mIncompleteFolders.begin(); it < mIncompleteFolders.end();)
|
||||
for(uuid_vec_t::iterator it = mIncompleteFolders.begin(); it < mIncompleteFolders.end();)
|
||||
{
|
||||
LLViewerInventoryCategory* cat = gInventory.getCategory(*it);
|
||||
if(!cat)
|
||||
|
|
@ -285,9 +285,9 @@ void LLInventoryFetchDescendentsObserver::changed(U32 mask)
|
|||
}
|
||||
|
||||
void LLInventoryFetchDescendentsObserver::fetchDescendents(
|
||||
const folder_ref_t& ids)
|
||||
const uuid_vec_t& ids)
|
||||
{
|
||||
for(folder_ref_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
|
||||
for(uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
|
||||
{
|
||||
LLViewerInventoryCategory* cat = gInventory.getCategory(*it);
|
||||
if(!cat) continue;
|
||||
|
|
@ -355,7 +355,7 @@ void LLInventoryFetchComboObserver::changed(U32 mask)
|
|||
{
|
||||
if(!mIncompleteItems.empty())
|
||||
{
|
||||
for(item_ref_t::iterator it = mIncompleteItems.begin(); it < mIncompleteItems.end(); )
|
||||
for(uuid_vec_t::iterator it = mIncompleteItems.begin(); it < mIncompleteItems.end(); )
|
||||
{
|
||||
LLViewerInventoryItem* item = gInventory.getItem(*it);
|
||||
if(!item)
|
||||
|
|
@ -364,7 +364,7 @@ void LLInventoryFetchComboObserver::changed(U32 mask)
|
|||
continue;
|
||||
}
|
||||
if(item->isComplete())
|
||||
{
|
||||
{
|
||||
mCompleteItems.push_back(*it);
|
||||
it = mIncompleteItems.erase(it);
|
||||
continue;
|
||||
|
|
@ -374,7 +374,7 @@ void LLInventoryFetchComboObserver::changed(U32 mask)
|
|||
}
|
||||
if(!mIncompleteFolders.empty())
|
||||
{
|
||||
for(folder_ref_t::iterator it = mIncompleteFolders.begin(); it < mIncompleteFolders.end();)
|
||||
for(uuid_vec_t::iterator it = mIncompleteFolders.begin(); it < mIncompleteFolders.end();)
|
||||
{
|
||||
LLViewerInventoryCategory* cat = gInventory.getCategory(*it);
|
||||
if(!cat)
|
||||
|
|
@ -399,11 +399,11 @@ void LLInventoryFetchComboObserver::changed(U32 mask)
|
|||
}
|
||||
|
||||
void LLInventoryFetchComboObserver::fetch(
|
||||
const folder_ref_t& folder_ids,
|
||||
const item_ref_t& item_ids)
|
||||
const uuid_vec_t& folder_ids,
|
||||
const uuid_vec_t& item_ids)
|
||||
{
|
||||
lldebugs << "LLInventoryFetchComboObserver::fetch()" << llendl;
|
||||
for(folder_ref_t::const_iterator fit = folder_ids.begin(); fit != folder_ids.end(); ++fit)
|
||||
for(uuid_vec_t::const_iterator fit = folder_ids.begin(); fit != folder_ids.end(); ++fit)
|
||||
{
|
||||
LLViewerInventoryCategory* cat = gInventory.getCategory(*fit);
|
||||
if(!cat) continue;
|
||||
|
|
@ -426,7 +426,7 @@ void LLInventoryFetchComboObserver::fetch(
|
|||
// have to fetch it individually.
|
||||
LLSD items_llsd;
|
||||
LLUUID owner_id;
|
||||
for(item_ref_t::const_iterator iit = item_ids.begin(); iit != item_ids.end(); ++iit)
|
||||
for(uuid_vec_t::const_iterator iit = item_ids.begin(); iit != item_ids.end(); ++iit)
|
||||
{
|
||||
LLViewerInventoryItem* item = gInventory.getItem(*iit);
|
||||
if(!item)
|
||||
|
|
@ -564,8 +564,8 @@ void LLInventoryTransactionObserver::changed(U32 mask)
|
|||
if(id == mTransactionID)
|
||||
{
|
||||
// woo hoo, we found it
|
||||
folder_ref_t folders;
|
||||
item_ref_t items;
|
||||
uuid_vec_t folders;
|
||||
uuid_vec_t items;
|
||||
S32 count;
|
||||
count = msg->getNumberOfBlocksFast(_PREHASH_FolderData);
|
||||
S32 i;
|
||||
|
|
|
|||
|
|
@ -93,9 +93,8 @@ public:
|
|||
protected:
|
||||
virtual void done() = 0;
|
||||
|
||||
typedef std::vector<LLUUID> item_ref_t;
|
||||
item_ref_t mComplete;
|
||||
item_ref_t mIncomplete;
|
||||
uuid_vec_t mComplete;
|
||||
uuid_vec_t mIncomplete;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -113,7 +112,7 @@ public:
|
|||
LLInventoryFetchObserver(bool retry_if_missing = false): mRetryIfMissing(retry_if_missing) {}
|
||||
virtual void changed(U32 mask);
|
||||
|
||||
typedef std::vector<LLUUID> item_ref_t;
|
||||
typedef uuid_vec_t item_ref_t;
|
||||
|
||||
bool isEverythingComplete() const;
|
||||
void fetchItems(const item_ref_t& ids);
|
||||
|
|
@ -138,15 +137,14 @@ public:
|
|||
LLInventoryFetchDescendentsObserver() {}
|
||||
virtual void changed(U32 mask);
|
||||
|
||||
typedef std::vector<LLUUID> folder_ref_t;
|
||||
void fetchDescendents(const folder_ref_t& ids);
|
||||
void fetchDescendents(const uuid_vec_t& ids);
|
||||
bool isEverythingComplete() const;
|
||||
virtual void done() = 0;
|
||||
|
||||
protected:
|
||||
bool isComplete(LLViewerInventoryCategory* cat);
|
||||
folder_ref_t mIncompleteFolders;
|
||||
folder_ref_t mCompleteFolders;
|
||||
uuid_vec_t mIncompleteFolders;
|
||||
uuid_vec_t mCompleteFolders;
|
||||
};
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
@ -163,18 +161,16 @@ public:
|
|||
LLInventoryFetchComboObserver() : mDone(false) {}
|
||||
virtual void changed(U32 mask);
|
||||
|
||||
typedef std::vector<LLUUID> folder_ref_t;
|
||||
typedef std::vector<LLUUID> item_ref_t;
|
||||
void fetch(const folder_ref_t& folder_ids, const item_ref_t& item_ids);
|
||||
void fetch(const uuid_vec_t& folder_ids, const uuid_vec_t& item_ids);
|
||||
|
||||
virtual void done() = 0;
|
||||
|
||||
protected:
|
||||
bool mDone;
|
||||
folder_ref_t mCompleteFolders;
|
||||
folder_ref_t mIncompleteFolders;
|
||||
item_ref_t mCompleteItems;
|
||||
item_ref_t mIncompleteItems;
|
||||
uuid_vec_t mCompleteFolders;
|
||||
uuid_vec_t mIncompleteFolders;
|
||||
uuid_vec_t mCompleteItems;
|
||||
uuid_vec_t mIncompleteItems;
|
||||
};
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
@ -197,7 +193,7 @@ public:
|
|||
protected:
|
||||
virtual void done() = 0;
|
||||
|
||||
typedef std::vector<LLUUID> item_ref_t;
|
||||
typedef uuid_vec_t item_ref_t;
|
||||
item_ref_t mExist;
|
||||
item_ref_t mMIA;
|
||||
};
|
||||
|
|
@ -221,8 +217,7 @@ public:
|
|||
protected:
|
||||
virtual void done() = 0;
|
||||
|
||||
typedef std::vector<LLUUID> item_ref_t;
|
||||
item_ref_t mAdded;
|
||||
uuid_vec_t mAdded;
|
||||
};
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
@ -242,9 +237,7 @@ public:
|
|||
virtual void changed(U32 mask);
|
||||
|
||||
protected:
|
||||
typedef std::vector<LLUUID> folder_ref_t;
|
||||
typedef std::vector<LLUUID> item_ref_t;
|
||||
virtual void done(const folder_ref_t& folders, const item_ref_t& items) = 0;
|
||||
virtual void done(const uuid_vec_t& folders, const uuid_vec_t& items) = 0;
|
||||
|
||||
LLTransactionID mTransactionID;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -723,7 +723,7 @@ void LLInventoryPanel::setSelection(const LLUUID& obj_id, BOOL take_keyboard_foc
|
|||
{
|
||||
// Don't select objects in COF (e.g. to prevent refocus when items are worn).
|
||||
const LLInventoryObject *obj = gInventory.getObject(obj_id);
|
||||
if (obj && obj->getParentUUID() == LLAppearanceManager::instance().getCOF())
|
||||
if (obj && obj->getParentUUID() == LLAppearanceMgr::instance().getCOF())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -871,10 +871,9 @@ bool LLInventoryPanel::attachObject(const LLSD& userdata)
|
|||
mFolders->getSelectionList(selected_items);
|
||||
|
||||
std::string joint_name = userdata.asString();
|
||||
LLVOAvatar *avatarp = static_cast<LLVOAvatar*>(gAgent.getAvatarObject());
|
||||
LLViewerJointAttachment* attachmentp = NULL;
|
||||
for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin();
|
||||
iter != avatarp->mAttachmentPoints.end(); )
|
||||
for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin();
|
||||
iter != gAgentAvatarp->mAttachmentPoints.end(); )
|
||||
{
|
||||
LLVOAvatar::attachment_map_t::iterator curiter = iter++;
|
||||
LLViewerJointAttachment* attachment = curiter->second;
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ public:
|
|||
private:
|
||||
/*virtual*/ void done()
|
||||
{
|
||||
std::vector<LLUUID>::const_iterator it = mAdded.begin(), end = mAdded.end();
|
||||
uuid_vec_t::const_iterator it = mAdded.begin(), end = mAdded.end();
|
||||
for(; it != end; ++it)
|
||||
{
|
||||
LLInventoryItem* item = gInventory.getItem(*it);
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@
|
|||
#include "lldrawable.h"
|
||||
#include "llglheaders.h"
|
||||
#include "lltrans.h"
|
||||
#include "llvoavatarself.h"
|
||||
|
||||
const F32 RADIUS_PIXELS = 100.f; // size in screen space
|
||||
const F32 SQ_RADIUS = RADIUS_PIXELS * RADIUS_PIXELS;
|
||||
|
|
@ -739,7 +740,7 @@ void LLManipRotate::renderSnapGuides()
|
|||
LLVector3 test_axis = constraint_axis;
|
||||
|
||||
BOOL constrain_to_ref_object = FALSE;
|
||||
if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && gAgent.getAvatarObject())
|
||||
if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && isAgentAvatarValid())
|
||||
{
|
||||
test_axis = test_axis * ~grid_rotation;
|
||||
}
|
||||
|
|
@ -766,7 +767,7 @@ void LLManipRotate::renderSnapGuides()
|
|||
}
|
||||
|
||||
LLVector3 projected_snap_axis = world_snap_axis;
|
||||
if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && gAgent.getAvatarObject())
|
||||
if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && isAgentAvatarValid())
|
||||
{
|
||||
projected_snap_axis = projected_snap_axis * grid_rotation;
|
||||
}
|
||||
|
|
@ -1282,7 +1283,7 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y )
|
|||
LLVector3 axis2;
|
||||
|
||||
LLVector3 test_axis = constraint_axis;
|
||||
if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && gAgent.getAvatarObject())
|
||||
if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && isAgentAvatarValid())
|
||||
{
|
||||
test_axis = test_axis * ~grid_rotation;
|
||||
}
|
||||
|
|
@ -1306,7 +1307,7 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y )
|
|||
axis1 = LLVector3::x_axis;
|
||||
}
|
||||
|
||||
if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && gAgent.getAvatarObject())
|
||||
if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && isAgentAvatarValid())
|
||||
{
|
||||
axis1 = axis1 * grid_rotation;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -714,7 +714,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
|
|||
// in position changes even when the mouse moves
|
||||
object->setPosition(new_position_local);
|
||||
rebuild(object);
|
||||
gAgent.getAvatarObject()->clampAttachmentPositions();
|
||||
gAgentAvatarp->clampAttachmentPositions();
|
||||
new_position_local = object->getPosition();
|
||||
|
||||
if (selectNode->mIndividualSelection)
|
||||
|
|
|
|||
|
|
@ -89,15 +89,14 @@ void LLMorphView::initialize()
|
|||
mCameraYaw = 0.f;
|
||||
mCameraDist = -1.f;
|
||||
|
||||
LLVOAvatar *avatarp = gAgent.getAvatarObject();
|
||||
if (!avatarp || avatarp->isDead())
|
||||
if (!isAgentAvatarValid() || gAgentAvatarp->isDead())
|
||||
{
|
||||
gAgentCamera.changeCameraToDefault();
|
||||
return;
|
||||
}
|
||||
|
||||
avatarp->stopMotion( ANIM_AGENT_BODY_NOISE );
|
||||
avatarp->mSpecialRenderMode = 3;
|
||||
gAgentAvatarp->stopMotion( ANIM_AGENT_BODY_NOISE );
|
||||
gAgentAvatarp->mSpecialRenderMode = 3;
|
||||
|
||||
// set up camera for close look at avatar
|
||||
mOldCameraNearClip = LLViewerCamera::getInstance()->getNear();
|
||||
|
|
@ -111,11 +110,10 @@ void LLMorphView::shutdown()
|
|||
{
|
||||
LLVOAvatarSelf::onCustomizeEnd();
|
||||
|
||||
LLVOAvatar *avatarp = gAgent.getAvatarObject();
|
||||
if(avatarp && !avatarp->isDead())
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
avatarp->startMotion( ANIM_AGENT_BODY_NOISE );
|
||||
avatarp->mSpecialRenderMode = 0;
|
||||
gAgentAvatarp->startMotion( ANIM_AGENT_BODY_NOISE );
|
||||
gAgentAvatarp->mSpecialRenderMode = 0;
|
||||
// reset camera
|
||||
LLViewerCamera::getInstance()->setNear(mOldCameraNearClip);
|
||||
}
|
||||
|
|
@ -164,15 +162,11 @@ void LLMorphView::updateCamera()
|
|||
{
|
||||
if (!mCameraTargetJoint)
|
||||
{
|
||||
setCameraTargetJoint(gAgent.getAvatarObject()->getJoint("mHead"));
|
||||
}
|
||||
|
||||
LLVOAvatar* avatar = gAgent.getAvatarObject();
|
||||
if( !avatar )
|
||||
{
|
||||
return;
|
||||
}
|
||||
LLJoint* root_joint = avatar->getRootJoint();
|
||||
setCameraTargetJoint(gAgentAvatarp->getJoint("mHead"));
|
||||
}
|
||||
if (!isAgentAvatarValid()) return;
|
||||
|
||||
LLJoint* root_joint = gAgentAvatarp->getRootJoint();
|
||||
if( !root_joint )
|
||||
{
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
#include "llagent.h"
|
||||
#include "llagentcamera.h"
|
||||
#include "llvoavatarself.h" // to check gAgent.getAvatarObject()->isSitting()
|
||||
#include "llvoavatarself.h" // to check gAgentAvatarp->isSitting()
|
||||
#include "llbottomtray.h"
|
||||
#include "llbutton.h"
|
||||
#include "llfloaterreg.h"
|
||||
|
|
@ -332,7 +332,7 @@ void LLFloaterMove::setMovementMode(const EMovementMode mode)
|
|||
updateButtonsWithMovementMode(mode);
|
||||
|
||||
bool bHideModeButtons = MM_FLY == mode
|
||||
|| (gAgent.getAvatarObject() && gAgent.getAvatarObject()->isSitting());
|
||||
|| (isAgentAvatarValid() && gAgentAvatarp->isSitting());
|
||||
|
||||
showModeButtons(!bHideModeButtons);
|
||||
|
||||
|
|
@ -388,9 +388,9 @@ void LLFloaterMove::initMovementMode()
|
|||
}
|
||||
setMovementMode(initMovementMode);
|
||||
|
||||
if (gAgent.getAvatarObject())
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
setEnabled(!gAgent.getAvatarObject()->isSitting());
|
||||
setEnabled(!gAgentAvatarp->isSitting());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -491,7 +491,7 @@ void LLFloaterMove::onOpen(const LLSD& key)
|
|||
showModeButtons(FALSE);
|
||||
}
|
||||
|
||||
if (gAgent.getAvatarObject() && gAgent.getAvatarObject()->isSitting())
|
||||
if (isAgentAvatarValid() && gAgentAvatarp->isSitting())
|
||||
{
|
||||
setSittingMode(TRUE);
|
||||
showModeButtons(FALSE);
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ LLGestureComboList::LLGestureComboList(const LLGestureComboList::Params& p)
|
|||
setCommitCallback(boost::bind(&LLGestureComboList::onCommitGesture, this));
|
||||
|
||||
// now register us as observer since we have a place to put the results
|
||||
LLGestureManager::instance().addObserver(this);
|
||||
LLGestureMgr::instance().addObserver(this);
|
||||
|
||||
// refresh list from current active gestures
|
||||
refreshGestures();
|
||||
|
|
@ -244,8 +244,8 @@ void LLGestureComboList::refreshGestures()
|
|||
mList->clearRows();
|
||||
mGestures.clear();
|
||||
|
||||
LLGestureManager::item_map_t::const_iterator it;
|
||||
const LLGestureManager::item_map_t& active_gestures = LLGestureManager::instance().getActiveGestures();
|
||||
LLGestureMgr::item_map_t::const_iterator it;
|
||||
const LLGestureMgr::item_map_t& active_gestures = LLGestureMgr::instance().getActiveGestures();
|
||||
LLSD::Integer idx(0);
|
||||
for (it = active_gestures.begin(); it != active_gestures.end(); ++it)
|
||||
{
|
||||
|
|
@ -289,7 +289,7 @@ void LLGestureComboList::refreshGestures()
|
|||
gesture = mGestures.at(index);
|
||||
}
|
||||
|
||||
if(gesture && LLGestureManager::instance().isGesturePlaying(gesture))
|
||||
if(gesture && LLGestureMgr::instance().isGesturePlaying(gesture))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -321,7 +321,7 @@ void LLGestureComboList::onCommitGesture()
|
|||
LLMultiGesture* gesture = mGestures.at(index);
|
||||
if(gesture)
|
||||
{
|
||||
LLGestureManager::instance().playGesture(gesture);
|
||||
LLGestureMgr::instance().playGesture(gesture);
|
||||
if(!gesture->mReplaceText.empty())
|
||||
{
|
||||
LLNearbyChatBar::sendChatFromViewer(gesture->mReplaceText, CHAT_TYPE_NORMAL, FALSE);
|
||||
|
|
@ -332,7 +332,7 @@ void LLGestureComboList::onCommitGesture()
|
|||
|
||||
LLGestureComboList::~LLGestureComboList()
|
||||
{
|
||||
LLGestureManager::instance().removeObserver(this);
|
||||
LLGestureMgr::instance().removeObserver(this);
|
||||
}
|
||||
|
||||
LLNearbyChatBar::LLNearbyChatBar()
|
||||
|
|
@ -476,7 +476,7 @@ void LLNearbyChatBar::onChatBoxKeystroke(LLLineEditor* caller, void* userdata)
|
|||
std::string utf8_trigger = wstring_to_utf8str(raw_text);
|
||||
std::string utf8_out_str(utf8_trigger);
|
||||
|
||||
if (LLGestureManager::instance().matchPrefix(utf8_trigger, &utf8_out_str))
|
||||
if (LLGestureMgr::instance().matchPrefix(utf8_trigger, &utf8_out_str))
|
||||
{
|
||||
std::string rest_of_match = utf8_out_str.substr(utf8_trigger.size());
|
||||
self->mChatBox->setText(utf8_trigger + rest_of_match); // keep original capitalization for user-entered part
|
||||
|
|
@ -558,7 +558,7 @@ void LLNearbyChatBar::sendChat( EChatType type )
|
|||
if (0 == channel)
|
||||
{
|
||||
// discard returned "found" boolean
|
||||
LLGestureManager::instance().triggerAndReviseString(utf8text, &utf8_revised_text);
|
||||
LLGestureMgr::instance().triggerAndReviseString(utf8text, &utf8_revised_text);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ void LLPanelBlockedList::onBlockByNameClick()
|
|||
LLFloaterGetBlockedObjectName::show(&LLPanelBlockedList::callbackBlockByName);
|
||||
}
|
||||
|
||||
void LLPanelBlockedList::callbackBlockPicked(const std::vector<std::string>& names, const std::vector<LLUUID>& ids)
|
||||
void LLPanelBlockedList::callbackBlockPicked(const std::vector<std::string>& names, const uuid_vec_t& ids)
|
||||
{
|
||||
if (names.empty() || ids.empty()) return;
|
||||
LLMute mute(ids[0], names[0], LLMute::AGENT);
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ private:
|
|||
void onPickBtnClick();
|
||||
void onBlockByNameClick();
|
||||
|
||||
void callbackBlockPicked(const std::vector<std::string>& names, const std::vector<LLUUID>& ids);
|
||||
void callbackBlockPicked(const std::vector<std::string>& names, const uuid_vec_t& ids);
|
||||
static void callbackBlockByName(const std::string& text);
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -602,7 +602,7 @@ LLPanel* LLPanelEditWearable::getPanel(EWearableType type)
|
|||
void LLPanelEditWearable::getSortedParams(value_map_t &sorted_params, const std::string &edit_group)
|
||||
{
|
||||
LLWearable::visual_param_vec_t param_list;
|
||||
ESex avatar_sex = gAgent.getAvatarObject()->getSex();
|
||||
ESex avatar_sex = gAgentAvatarp->getSex();
|
||||
|
||||
mWearablePtr->getVisualParams(param_list);
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public:
|
|||
~impl();
|
||||
|
||||
void addUsers(const std::vector<std::string>& names,
|
||||
const std::vector<LLUUID>& agent_ids);
|
||||
const uuid_vec_t& agent_ids);
|
||||
void submitInvitations();
|
||||
void addRoleNames(LLGroupMgrGroupData* gdatap);
|
||||
void handleRemove();
|
||||
|
|
@ -69,7 +69,7 @@ public:
|
|||
static void callbackClickRemove(void* userdata);
|
||||
static void callbackSelect(LLUICtrl* ctrl, void* userdata);
|
||||
static void callbackAddUsers(const std::vector<std::string>& names,
|
||||
const std::vector<LLUUID>& agent_ids,
|
||||
const uuid_vec_t& agent_ids,
|
||||
void* user_data);
|
||||
bool inviteOwnerCallback(const LLSD& notification, const LLSD& response);
|
||||
|
||||
|
|
@ -111,7 +111,7 @@ LLPanelGroupInvite::impl::~impl()
|
|||
}
|
||||
|
||||
void LLPanelGroupInvite::impl::addUsers(const std::vector<std::string>& names,
|
||||
const std::vector<LLUUID>& agent_ids)
|
||||
const uuid_vec_t& agent_ids)
|
||||
{
|
||||
std::string name;
|
||||
LLUUID id;
|
||||
|
|
@ -361,7 +361,7 @@ void LLPanelGroupInvite::impl::callbackClickOK(void* userdata)
|
|||
|
||||
//static
|
||||
void LLPanelGroupInvite::impl::callbackAddUsers(const std::vector<std::string>& names,
|
||||
const std::vector<LLUUID>& ids,
|
||||
const uuid_vec_t& ids,
|
||||
void* user_data)
|
||||
{
|
||||
impl* selfp = (impl*) user_data;
|
||||
|
|
@ -399,7 +399,7 @@ void LLPanelGroupInvite::clear()
|
|||
mImplementation->mOKButton->setEnabled(FALSE);
|
||||
}
|
||||
|
||||
void LLPanelGroupInvite::addUsers(std::vector<LLUUID>& agent_ids)
|
||||
void LLPanelGroupInvite::addUsers(uuid_vec_t& agent_ids)
|
||||
{
|
||||
std::vector<std::string> names;
|
||||
for (S32 i = 0; i < (S32)agent_ids.size(); i++)
|
||||
|
|
@ -456,7 +456,7 @@ void LLPanelGroupInvite::addUsers(std::vector<LLUUID>& agent_ids)
|
|||
void LLPanelGroupInvite::addUserCallback(const LLUUID& id, const std::string& first_name, const std::string& last_name)
|
||||
{
|
||||
std::vector<std::string> names;
|
||||
std::vector<LLUUID> agent_ids;
|
||||
uuid_vec_t agent_ids;
|
||||
std::string full_name = first_name + " " + last_name;
|
||||
agent_ids.push_back(id);
|
||||
names.push_back(first_name + " " + last_name);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public:
|
|||
LLPanelGroupInvite(const LLUUID& group_id);
|
||||
~LLPanelGroupInvite();
|
||||
|
||||
void addUsers(std::vector<LLUUID>& agent_ids);
|
||||
void addUsers(uuid_vec_t& agent_ids);
|
||||
/**
|
||||
* this callback is being used to add a user whose fullname isn't been loaded before invoking of addUsers().
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -859,7 +859,7 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
|
|||
if (selection.empty()) return;
|
||||
|
||||
// Build a vector of all selected members, and gather allowed actions.
|
||||
std::vector<LLUUID> selected_members;
|
||||
uuid_vec_t selected_members;
|
||||
U64 allowed_by_all = 0xffffffffffffLL;
|
||||
U64 allowed_by_some = 0;
|
||||
|
||||
|
|
@ -925,8 +925,8 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
|
|||
if (cb_enable && (count > 0) && role_id == gdatap->mOwnerRole)
|
||||
{
|
||||
// Check if any owners besides this agent are selected.
|
||||
std::vector<LLUUID>::const_iterator member_iter;
|
||||
std::vector<LLUUID>::const_iterator member_end =
|
||||
uuid_vec_t::const_iterator member_iter;
|
||||
uuid_vec_t::const_iterator member_end =
|
||||
selected_members.end();
|
||||
for (member_iter = selected_members.begin();
|
||||
member_iter != member_end;
|
||||
|
|
@ -952,7 +952,7 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
|
|||
|
||||
//now see if there are any role changes for the selected
|
||||
//members and remember to include them
|
||||
std::vector<LLUUID>::iterator sel_mem_iter = selected_members.begin();
|
||||
uuid_vec_t::iterator sel_mem_iter = selected_members.begin();
|
||||
for (; sel_mem_iter != selected_members.end(); sel_mem_iter++)
|
||||
{
|
||||
LLRoleMemberChangeType type;
|
||||
|
|
@ -1009,7 +1009,7 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
|
|||
check->setTentative(
|
||||
(0 != count)
|
||||
&& (selected_members.size() !=
|
||||
(std::vector<LLUUID>::size_type)count));
|
||||
(uuid_vec_t::size_type)count));
|
||||
|
||||
//NOTE: as of right now a user can break the group
|
||||
//by removing himself from a role if he is the
|
||||
|
|
@ -1084,7 +1084,7 @@ void LLPanelGroupMembersSubTab::onEjectMembers(void *userdata)
|
|||
void LLPanelGroupMembersSubTab::handleEjectMembers()
|
||||
{
|
||||
//send down an eject message
|
||||
std::vector<LLUUID> selected_members;
|
||||
uuid_vec_t selected_members;
|
||||
|
||||
std::vector<LLScrollListItem*> selection = mMembersList->getAllSelected();
|
||||
if (selection.empty()) return;
|
||||
|
|
@ -1105,13 +1105,13 @@ void LLPanelGroupMembersSubTab::handleEjectMembers()
|
|||
selected_members);
|
||||
}
|
||||
|
||||
void LLPanelGroupMembersSubTab::sendEjectNotifications(const LLUUID& group_id, const std::vector<LLUUID>& selected_members)
|
||||
void LLPanelGroupMembersSubTab::sendEjectNotifications(const LLUUID& group_id, const uuid_vec_t& selected_members)
|
||||
{
|
||||
LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->getGroupData(group_id);
|
||||
|
||||
if (group_data)
|
||||
{
|
||||
for (std::vector<LLUUID>::const_iterator i = selected_members.begin(); i != selected_members.end(); ++i)
|
||||
for (uuid_vec_t::const_iterator i = selected_members.begin(); i != selected_members.end(); ++i)
|
||||
{
|
||||
LLSD args;
|
||||
std::string name;
|
||||
|
|
@ -1437,7 +1437,7 @@ U64 LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges(const LLUUID& ag
|
|||
|
||||
if ( role_change_datap )
|
||||
{
|
||||
std::vector<LLUUID> roles_to_be_removed;
|
||||
uuid_vec_t roles_to_be_removed;
|
||||
|
||||
for (role_change_data_map_t::iterator role = role_change_datap->begin();
|
||||
role != role_change_datap->end(); ++ role)
|
||||
|
|
@ -2086,8 +2086,8 @@ void LLPanelGroupRolesSubTab::buildMembersList()
|
|||
LLGroupRoleData* rdatap = (*rit).second;
|
||||
if (rdatap)
|
||||
{
|
||||
std::vector<LLUUID>::const_iterator mit = rdatap->getMembersBegin();
|
||||
std::vector<LLUUID>::const_iterator end = rdatap->getMembersEnd();
|
||||
uuid_vec_t::const_iterator mit = rdatap->getMembersBegin();
|
||||
uuid_vec_t::const_iterator end = rdatap->getMembersEnd();
|
||||
for ( ; mit != end; ++mit)
|
||||
{
|
||||
mAssignedMembersList->addNameItem((*mit));
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ public:
|
|||
|
||||
static void onEjectMembers(void*);
|
||||
void handleEjectMembers();
|
||||
void sendEjectNotifications(const LLUUID& group_id, const std::vector<LLUUID>& selected_members);
|
||||
void sendEjectNotifications(const LLUUID& group_id, const uuid_vec_t& selected_members);
|
||||
|
||||
static void onRoleCheck(LLUICtrl* check, void* user_data);
|
||||
void handleRoleCheck(const LLUUID& role_id,
|
||||
|
|
|
|||
|
|
@ -460,7 +460,7 @@ void LLPanelOutfitEdit::lookFetched(void)
|
|||
if (mLookContents->getItemCount() != mNumItemsInLook)
|
||||
{
|
||||
mNumItemsInLook = mLookContents->getItemCount();
|
||||
LLAppearanceManager::instance().updateCOF(mLookID);
|
||||
LLAppearanceMgr::instance().updateCOF(mLookID);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -470,7 +470,7 @@ void LLPanelOutfitEdit::updateLookInfo()
|
|||
{
|
||||
mLookContents->clearRows();
|
||||
|
||||
LLInventoryFetchDescendentsObserver::folder_ref_t folders;
|
||||
uuid_vec_t folders;
|
||||
folders.push_back(mLookID);
|
||||
mFetchLook->fetchDescendents(folders);
|
||||
if (mFetchLook->isEverythingComplete())
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ void LLPanelOutfitsInventory::onSave()
|
|||
{
|
||||
std::string outfit_name;
|
||||
|
||||
if (!LLAppearanceManager::getInstance()->getBaseOutfitName(outfit_name))
|
||||
if (!LLAppearanceMgr::getInstance()->getBaseOutfitName(outfit_name))
|
||||
{
|
||||
outfit_name = LLViewerFolderType::lookupNewCategoryName(LLFolderType::FT_OUTFIT);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,13 +134,13 @@ public:
|
|||
typedef std::map < LLUUID, LLVector3d > id_to_pos_map_t;
|
||||
LLAvatarItemDistanceComparator() {};
|
||||
|
||||
void updateAvatarsPositions(std::vector<LLVector3d>& positions, std::vector<LLUUID>& uuids)
|
||||
void updateAvatarsPositions(std::vector<LLVector3d>& positions, uuid_vec_t& uuids)
|
||||
{
|
||||
std::vector<LLVector3d>::const_iterator
|
||||
pos_it = positions.begin(),
|
||||
pos_end = positions.end();
|
||||
|
||||
std::vector<LLUUID>::const_iterator
|
||||
uuid_vec_t::const_iterator
|
||||
id_it = uuids.begin(),
|
||||
id_end = uuids.end();
|
||||
|
||||
|
|
@ -759,7 +759,7 @@ void LLPanelPeople::updateButtons()
|
|||
//bool recent_tab_active = (cur_tab == RECENT_TAB_NAME);
|
||||
LLUUID selected_id;
|
||||
|
||||
std::vector<LLUUID> selected_uuids;
|
||||
uuid_vec_t selected_uuids;
|
||||
getCurrentItemIDs(selected_uuids);
|
||||
bool item_selected = (selected_uuids.size() == 1);
|
||||
bool multiple_selected = (selected_uuids.size() >= 1);
|
||||
|
|
@ -855,7 +855,7 @@ LLUUID LLPanelPeople::getCurrentItemID() const
|
|||
return LLUUID::null;
|
||||
}
|
||||
|
||||
void LLPanelPeople::getCurrentItemIDs(std::vector<LLUUID>& selected_uuids) const
|
||||
void LLPanelPeople::getCurrentItemIDs(uuid_vec_t& selected_uuids) const
|
||||
{
|
||||
std::string cur_tab = getActiveTabName();
|
||||
|
||||
|
|
@ -1066,10 +1066,10 @@ void LLPanelPeople::onAddFriendButtonClicked()
|
|||
}
|
||||
}
|
||||
|
||||
bool LLPanelPeople::isItemsFreeOfFriends(const std::vector<LLUUID>& uuids)
|
||||
bool LLPanelPeople::isItemsFreeOfFriends(const uuid_vec_t& uuids)
|
||||
{
|
||||
const LLAvatarTracker& av_tracker = LLAvatarTracker::instance();
|
||||
for ( std::vector<LLUUID>::const_iterator
|
||||
for ( uuid_vec_t::const_iterator
|
||||
id = uuids.begin(),
|
||||
id_end = uuids.end();
|
||||
id != id_end; ++id )
|
||||
|
|
@ -1097,7 +1097,7 @@ void LLPanelPeople::onAddFriendWizButtonClicked()
|
|||
|
||||
void LLPanelPeople::onDeleteFriendButtonClicked()
|
||||
{
|
||||
std::vector<LLUUID> selected_uuids;
|
||||
uuid_vec_t selected_uuids;
|
||||
getCurrentItemIDs(selected_uuids);
|
||||
|
||||
if (selected_uuids.size() == 1)
|
||||
|
|
@ -1124,7 +1124,7 @@ void LLPanelPeople::onChatButtonClicked()
|
|||
|
||||
void LLPanelPeople::onImButtonClicked()
|
||||
{
|
||||
std::vector<LLUUID> selected_uuids;
|
||||
uuid_vec_t selected_uuids;
|
||||
getCurrentItemIDs(selected_uuids);
|
||||
if ( selected_uuids.size() == 1 )
|
||||
{
|
||||
|
|
@ -1146,7 +1146,7 @@ void LLPanelPeople::onActivateButtonClicked()
|
|||
// static
|
||||
void LLPanelPeople::onAvatarPicked(
|
||||
const std::vector<std::string>& names,
|
||||
const std::vector<LLUUID>& ids)
|
||||
const uuid_vec_t& ids)
|
||||
{
|
||||
if (!names.empty() && !ids.empty())
|
||||
LLAvatarActions::requestFriendshipDialog(ids[0], names[0]);
|
||||
|
|
@ -1296,7 +1296,7 @@ bool LLPanelPeople::onRecentViewSortMenuItemCheck(const LLSD& userdata)
|
|||
|
||||
void LLPanelPeople::onCallButtonClicked()
|
||||
{
|
||||
std::vector<LLUUID> selected_uuids;
|
||||
uuid_vec_t selected_uuids;
|
||||
getCurrentItemIDs(selected_uuids);
|
||||
|
||||
if (selected_uuids.size() == 1)
|
||||
|
|
|
|||
|
|
@ -78,12 +78,12 @@ private:
|
|||
void updateRecentList();
|
||||
|
||||
bool isFriendOnline(const LLUUID& id);
|
||||
bool isItemsFreeOfFriends(const std::vector<LLUUID>& uuids);
|
||||
bool isItemsFreeOfFriends(const uuid_vec_t& uuids);
|
||||
|
||||
void updateButtons();
|
||||
std::string getActiveTabName() const;
|
||||
LLUUID getCurrentItemID() const;
|
||||
void getCurrentItemIDs(std::vector<LLUUID>& selected_uuids) const;
|
||||
void getCurrentItemIDs(uuid_vec_t& selected_uuids) const;
|
||||
void buttonSetVisible(std::string btn_name, BOOL visible);
|
||||
void buttonSetEnabled(const std::string& btn_name, bool enabled);
|
||||
void buttonSetAction(const std::string& btn_name, const commit_signal_t::slot_type& cb);
|
||||
|
|
@ -134,7 +134,7 @@ private:
|
|||
// misc callbacks
|
||||
static void onAvatarPicked(
|
||||
const std::vector<std::string>& names,
|
||||
const std::vector<LLUUID>& ids);
|
||||
const uuid_vec_t& ids);
|
||||
|
||||
void onFriendsAccordionExpandedCollapsed(LLUICtrl* ctrl, const LLSD& param, LLAvatarList* avatar_list);
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ ContextMenu::~ContextMenu()
|
|||
}
|
||||
}
|
||||
|
||||
void ContextMenu::show(LLView* spawning_view, const std::vector<LLUUID>& uuids, S32 x, S32 y)
|
||||
void ContextMenu::show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y)
|
||||
{
|
||||
if (mMenu)
|
||||
{
|
||||
|
|
@ -177,7 +177,7 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata)
|
|||
|
||||
bool result = (mUUIDs.size() > 0);
|
||||
|
||||
std::vector<LLUUID>::const_iterator
|
||||
uuid_vec_t::const_iterator
|
||||
id = mUUIDs.begin(),
|
||||
uuids_end = mUUIDs.end();
|
||||
|
||||
|
|
@ -200,7 +200,7 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata)
|
|||
|
||||
bool result = (mUUIDs.size() > 0);
|
||||
|
||||
std::vector<LLUUID>::const_iterator
|
||||
uuid_vec_t::const_iterator
|
||||
id = mUUIDs.begin(),
|
||||
uuids_end = mUUIDs.end();
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public:
|
|||
*
|
||||
* @param uuids - an array of avatar or group ids
|
||||
*/
|
||||
/*virtual*/ void show(LLView* spawning_view, const std::vector<LLUUID>& uuids, S32 x, S32 y);
|
||||
/*virtual*/ void show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y);
|
||||
|
||||
virtual void hide();
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ protected:
|
|||
|
||||
virtual LLContextMenu* createMenu() = 0;
|
||||
|
||||
std::vector<LLUUID> mUUIDs;
|
||||
uuid_vec_t mUUIDs;
|
||||
LLContextMenu* mMenu;
|
||||
LLHandle<LLView> mMenuHandle;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1006,9 +1006,9 @@ void LLPanelPlaces::changedGlobalPos(const LLVector3d &global_pos)
|
|||
updateVerbs();
|
||||
}
|
||||
|
||||
void LLPanelPlaces::showAddedLandmarkInfo(const std::vector<LLUUID>& items)
|
||||
void LLPanelPlaces::showAddedLandmarkInfo(const uuid_vec_t& items)
|
||||
{
|
||||
for (std::vector<LLUUID>::const_iterator item_iter = items.begin();
|
||||
for (uuid_vec_t::const_iterator item_iter = items.begin();
|
||||
item_iter != items.end();
|
||||
++item_iter)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ public:
|
|||
void changedGlobalPos(const LLVector3d &global_pos);
|
||||
|
||||
// Opens landmark info panel when agent creates or receives landmark.
|
||||
void showAddedLandmarkInfo(const std::vector<LLUUID>& items);
|
||||
void showAddedLandmarkInfo(const uuid_vec_t& items);
|
||||
|
||||
void setItem(LLInventoryItem* item);
|
||||
|
||||
|
|
|
|||
|
|
@ -445,7 +445,7 @@ LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu()
|
|||
return main_menu;
|
||||
}
|
||||
|
||||
void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const std::vector<LLUUID>& uuids, S32 x, S32 y)
|
||||
void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y)
|
||||
{
|
||||
LLPanelPeopleMenus::ContextMenu::show(spawning_view, uuids, x, y);
|
||||
|
||||
|
|
@ -615,7 +615,7 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD&
|
|||
|
||||
bool result = (mUUIDs.size() > 0);
|
||||
|
||||
std::vector<LLUUID>::const_iterator
|
||||
uuid_vec_t::const_iterator
|
||||
id = mUUIDs.begin(),
|
||||
uuids_end = mUUIDs.end();
|
||||
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ class LLParticipantList
|
|||
public:
|
||||
LLParticipantListMenu(LLParticipantList& parent):mParent(parent){};
|
||||
/*virtual*/ LLContextMenu* createMenu();
|
||||
/*virtual*/ void show(LLView* spawning_view, const std::vector<LLUUID>& uuids, S32 x, S32 y);
|
||||
/*virtual*/ void show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y);
|
||||
protected:
|
||||
LLParticipantList& mParent;
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -179,10 +179,9 @@ void LLPreview::onCommit()
|
|||
// update the object itself.
|
||||
if( item->getType() == LLAssetType::AT_OBJECT )
|
||||
{
|
||||
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
|
||||
if(avatarp)
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
LLViewerObject* obj = avatarp->getWornAttachment( item->getUUID() );
|
||||
LLViewerObject* obj = gAgentAvatarp->getWornAttachment( item->getUUID() );
|
||||
if( obj )
|
||||
{
|
||||
LLSelectMgr::getInstance()->deselectAll();
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue