summaryrefslogtreecommitdiff
path: root/indra/newview/llgesturemgr.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2015-07-14 18:54:37 -0400
committerOz Linden <oz@lindenlab.com>2015-07-14 18:54:37 -0400
commitf46526b16004e734d0a459e482ab9bb5df656c54 (patch)
tree87c1390cc6b001cf1bc4e52c3dab52f152313c11 /indra/newview/llgesturemgr.cpp
parentc2f9c5ac8189b8076d51711c3be09dfbe309e22b (diff)
parent02441157a0d22619ccf2a2ee735c8f5251b54fdb (diff)
merge changes for 3.8.1-release
Diffstat (limited to 'indra/newview/llgesturemgr.cpp')
-rwxr-xr-xindra/newview/llgesturemgr.cpp32
1 files changed, 9 insertions, 23 deletions
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index 119872ec29..950a6cfaef 100755
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -59,10 +59,6 @@
// Longest time, in seconds, to wait for all animations to stop playing
const F32 MAX_WAIT_ANIM_SECS = 30.f;
-// If this gesture is a link, get the base gesture that this link points to,
-// otherwise just return this id.
-static const LLUUID& get_linked_uuid(const LLUUID& item_id);
-
// Lightweight constructor.
// init() does the heavy lifting.
LLGestureMgr::LLGestureMgr()
@@ -253,7 +249,7 @@ void LLGestureMgr::activateGestureWithAsset(const LLUUID& item_id,
BOOL inform_server,
BOOL deactivate_similar)
{
- const LLUUID& base_item_id = get_linked_uuid(item_id);
+ const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id);
if( !gAssetStorage )
{
@@ -307,7 +303,7 @@ void notify_update_label(const LLUUID& base_item_id)
void LLGestureMgr::deactivateGesture(const LLUUID& item_id)
{
- const LLUUID& base_item_id = get_linked_uuid(item_id);
+ const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id);
item_map_t::iterator it = mActive.find(base_item_id);
if (it == mActive.end())
{
@@ -353,7 +349,7 @@ void LLGestureMgr::deactivateGesture(const LLUUID& item_id)
void LLGestureMgr::deactivateSimilarGestures(LLMultiGesture* in, const LLUUID& in_item_id)
{
- const LLUUID& base_in_item_id = get_linked_uuid(in_item_id);
+ const LLUUID& base_in_item_id = gInventory.getLinkedItemID(in_item_id);
uuid_vec_t gest_item_ids;
// Deactivate all gestures that match
@@ -440,7 +436,7 @@ void LLGestureMgr::deactivateSimilarGestures(LLMultiGesture* in, const LLUUID& i
BOOL LLGestureMgr::isGestureActive(const LLUUID& item_id)
{
- const LLUUID& base_item_id = get_linked_uuid(item_id);
+ const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id);
item_map_t::iterator it = mActive.find(base_item_id);
return (it != mActive.end());
}
@@ -448,7 +444,7 @@ BOOL LLGestureMgr::isGestureActive(const LLUUID& item_id)
BOOL LLGestureMgr::isGesturePlaying(const LLUUID& item_id)
{
- const LLUUID& base_item_id = get_linked_uuid(item_id);
+ const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id);
item_map_t::iterator it = mActive.find(base_item_id);
if (it == mActive.end()) return FALSE;
@@ -471,7 +467,7 @@ BOOL LLGestureMgr::isGesturePlaying(LLMultiGesture* gesture)
void LLGestureMgr::replaceGesture(const LLUUID& item_id, LLMultiGesture* new_gesture, const LLUUID& asset_id)
{
- const LLUUID& base_item_id = get_linked_uuid(item_id);
+ const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id);
item_map_t::iterator it = mActive.find(base_item_id);
if (it == mActive.end())
@@ -513,7 +509,7 @@ void LLGestureMgr::replaceGesture(const LLUUID& item_id, LLMultiGesture* new_ges
void LLGestureMgr::replaceGesture(const LLUUID& item_id, const LLUUID& new_asset_id)
{
- const LLUUID& base_item_id = get_linked_uuid(item_id);
+ const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id);
item_map_t::iterator it = LLGestureMgr::instance().mActive.find(base_item_id);
if (it == mActive.end())
@@ -608,7 +604,7 @@ void LLGestureMgr::playGesture(LLMultiGesture* gesture)
// Convenience function that looks up the item_id for you.
void LLGestureMgr::playGesture(const LLUUID& item_id)
{
- const LLUUID& base_item_id = get_linked_uuid(item_id);
+ const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id);
item_map_t::iterator it = mActive.find(base_item_id);
if (it == mActive.end()) return;
@@ -1297,7 +1293,7 @@ void LLGestureMgr::stopGesture(LLMultiGesture* gesture)
void LLGestureMgr::stopGesture(const LLUUID& item_id)
{
- const LLUUID& base_item_id = get_linked_uuid(item_id);
+ const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id);
item_map_t::iterator it = mActive.find(base_item_id);
if (it == mActive.end()) return;
@@ -1457,14 +1453,4 @@ void LLGestureMgr::done()
}
}
-// static
-const LLUUID& get_linked_uuid(const LLUUID &item_id)
-{
- LLViewerInventoryItem* item = gInventory.getItem(item_id);
- if (item && item->getIsLinkType())
- {
- return item->getLinkedUUID();
- }
- return item_id;
-}