diff options
| author | Aura Linden <aura@lindenlab.com> | 2014-09-19 10:54:55 -0700 |
|---|---|---|
| committer | Aura Linden <aura@lindenlab.com> | 2014-09-19 10:54:55 -0700 |
| commit | c25a7866408d8590b7e9672d019089cb1358dbce (patch) | |
| tree | 22c361d0b9647c74813fda9cffd75617036cef17 /indra/newview/llviewerobject.cpp | |
| parent | 9ae872da5996d6c7d1f35fbf5f5c6edc75fae3c5 (diff) | |
| parent | 951c83724d7e364ac52cbee2d657711fda7d2c26 (diff) | |
Pulled merge from viewer-tiger
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
| -rwxr-xr-x | indra/newview/llviewerobject.cpp | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 80592f01ce..33b442815d 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2274,7 +2274,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, } } - if ((new_rot != getRotation()) + if ((new_rot.isNotEqualEps(getRotation(), F_ALMOST_ZERO)) || (new_angv != old_angv)) { if (new_rot != mPreviousRotation) @@ -2792,8 +2792,8 @@ void LLViewerObject::dirtyInventory() mInventory->clear(); // will deref and delete entries delete mInventory; mInventory = NULL; - mInventoryDirty = TRUE; } + mInventoryDirty = TRUE; } void LLViewerObject::registerInventoryListener(LLVOInventoryListener* listener, void* user_data) @@ -2830,12 +2830,15 @@ void LLViewerObject::clearInventoryListeners() void LLViewerObject::requestInventory() { - mInventoryDirty = FALSE; + if(mInventoryDirty && mInventory && !mInventoryCallbacks.empty()) + { + mInventory->clear(); // will deref and delete entries + delete mInventory; + mInventory = NULL; + mInventoryDirty = FALSE; //since we are going to request it now + } if(mInventory) { - //mInventory->clear() // will deref and delete it - //delete mInventory; - //mInventory = NULL; doInventoryCallback(); } // throw away duplicate requests @@ -6190,6 +6193,17 @@ const LLUUID &LLViewerObject::extractAttachmentItemID() return getAttachmentItemID(); } +const std::string& LLViewerObject::getAttachmentItemName() +{ + static std::string empty; + LLInventoryItem *item = gInventory.getItem(getAttachmentItemID()); + if (isAttachment() && item) + { + return item->getName(); + } + return empty; +} + //virtual LLVOAvatar* LLViewerObject::getAvatar() const { |
