diff options
| author | Steven Bennetts <steve@lindenlab.com> | 2007-03-02 21:25:50 +0000 |
|---|---|---|
| committer | Steven Bennetts <steve@lindenlab.com> | 2007-03-02 21:25:50 +0000 |
| commit | 4dabd9c0472deb49573fdafef2fa413e59703f19 (patch) | |
| tree | 06c680d6a2047e03838d6548bccd26c7baf9d652 /indra/llcharacter/llkeyframemotion.cpp | |
| parent | d4462963c6ba5db2088723bbedc7b60f1184c594 (diff) | |
merge release@58699 beta-1-14-0@58707 -> release
Diffstat (limited to 'indra/llcharacter/llkeyframemotion.cpp')
| -rw-r--r-- | indra/llcharacter/llkeyframemotion.cpp | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index bfa4b637e1..ea77126aca 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -1892,28 +1892,26 @@ void LLKeyframeMotion::onLoadComplete(LLVFS *vfs, void* user_data, S32 status) { LLUUID* id = (LLUUID*)user_data; + + std::vector<LLCharacter* >::iterator char_iter = LLCharacter::sInstances.begin(); - LLCharacter* character = NULL; + while(char_iter != LLCharacter::sInstances.end() && + (*char_iter)->getID() != *id) + { + ++char_iter; + } - for(character = LLCharacter::sInstances.getFirstData(); - character; - character = LLCharacter::sInstances.getNextData()) - { - if (character->getID() == *id) - { - break; - } - } - delete id; - if (!character) + if (char_iter == LLCharacter::sInstances.end()) { return; } + LLCharacter* character = *char_iter; + // create an instance of this motion (it may or may not already exist) - LLKeyframeMotion* motionp = (LLKeyframeMotion*)character->createMotion(asset_uuid); + LLKeyframeMotion* motionp = (LLKeyframeMotion*) character->createMotion(asset_uuid); if (0 == status && motionp) { |
