diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llgesturemgr.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/linden/indra/newview/llgesturemgr.cpp b/linden/indra/newview/llgesturemgr.cpp index 9b8f2c8..3e17ecf 100644 --- a/linden/indra/newview/llgesturemgr.cpp +++ b/linden/indra/newview/llgesturemgr.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file llgesturemgr.cpp | 2 | * @file llgesturemgr.cpp |
3 | * @brief Manager for playing gestures on the viewer | 3 | * @brief Manager for playing gestures on the viewer |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2004&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2004-2007, Linden Research, Inc. | 7 | * Copyright (c) 2004-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #include "llviewerprecompiledheaders.h" | 32 | #include "llviewerprecompiledheaders.h" |
@@ -436,6 +439,19 @@ void LLGestureManager::replaceGesture(const LLUUID& item_id, LLMultiGesture* new | |||
436 | notifyObservers(); | 439 | notifyObservers(); |
437 | } | 440 | } |
438 | 441 | ||
442 | void LLGestureManager::replaceGesture(const LLUUID& item_id, const LLUUID& new_asset_id) | ||
443 | { | ||
444 | item_map_t::iterator it = gGestureManager.mActive.find(item_id); | ||
445 | if (it == mActive.end()) | ||
446 | { | ||
447 | llwarns << "replaceGesture for inactive gesture " << item_id << llendl; | ||
448 | return; | ||
449 | } | ||
450 | |||
451 | // mActive owns this gesture pointer, so clean up memory. | ||
452 | LLMultiGesture* gesture = (*it).second; | ||
453 | gGestureManager.replaceGesture(item_id, gesture, new_asset_id); | ||
454 | } | ||
439 | 455 | ||
440 | void LLGestureManager::playGesture(LLMultiGesture* gesture) | 456 | void LLGestureManager::playGesture(LLMultiGesture* gesture) |
441 | { | 457 | { |