diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-02-01 02:23:35 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-02-01 02:23:35 +0000 |
commit | b302f15deea0f4f7f5de75bfd3776c17021b6444 (patch) | |
tree | 7a2842445c8dd6c8537bd9f8d4d171e95b85a845 /indra/newview/llagent.cpp | |
parent | 6ae0a9e2c1ac51385c341ff4a93384950e2e7e40 (diff) |
EFFECTIVE MERGE: maint-viewer-3 -r 77368:77381 -> release
ACTUAL MERGE: merge maint-viewer-3-merge -r 79051 -> release
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r-- | indra/newview/llagent.cpp | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index f406d61a9e..51ab279e16 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3373,10 +3373,11 @@ void LLAgent::updateCamera() mAvatarObject->mRoot.updateWorldMatrixChildren(); - for(LLViewerJointAttachment *attachment = mAvatarObject->mAttachmentPoints.getFirstData(); - attachment; - attachment = mAvatarObject->mAttachmentPoints.getNextData()) + for (LLVOAvatar::attachment_map_t::iterator iter = mAvatarObject->mAttachmentPoints.begin(); + iter != mAvatarObject->mAttachmentPoints.end(); ) { + LLVOAvatar::attachment_map_t::iterator curiter = iter++; + LLViewerJointAttachment* attachment = curiter->second; LLViewerObject *attached_object = attachment->getObject(); if (attached_object && !attached_object->isDead() && attached_object->mDrawable.notNull()) { @@ -5749,6 +5750,19 @@ bool LLAgent::teleportCore(bool is_local) return false; } + // Stop all animation before actual teleporting + LLVOAvatar* avatarp = gAgent.getAvatarObject(); + if (avatarp) + { + for ( LLVOAvatar::AnimIterator anim_it= avatarp->mPlayingAnimations.begin() + ; anim_it != avatarp->mPlayingAnimations.end() + ; anim_it++) + { + avatarp->stopMotion(anim_it->first); + } + avatarp->processAnimationStateChanges(); + } + // Don't call LLFirstUse::useTeleport because we don't know // yet if the teleport will succeed. Look in // process_teleport_location_reply @@ -6830,11 +6844,10 @@ void LLAgent::makeNewOutfit( { BOOL msg_started = FALSE; LLMessageSystem* msg = gMessageSystem; - S32 i; - for( i = 0; i < attachments_to_include.count(); i++ ) + for( S32 i = 0; i < attachments_to_include.count(); i++ ) { S32 attachment_pt = attachments_to_include[i]; - LLViewerJointAttachment* attachment = mAvatarObject->mAttachmentPoints.getIfThere( attachment_pt ); + LLViewerJointAttachment* attachment = get_if_there(mAvatarObject->mAttachmentPoints, attachment_pt, (LLViewerJointAttachment*)NULL ); if(!attachment) continue; LLViewerObject* attached_object = attachment->getObject(); if(!attached_object) continue; @@ -7454,11 +7467,11 @@ void LLAgent::userRemoveAllAttachments( void* userdata ) gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - LLViewerJointAttachment* attachment; - for (attachment = avatarp->mAttachmentPoints.getFirstData(); - attachment; - attachment = avatarp->mAttachmentPoints.getNextData()) + for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin(); + iter != avatarp->mAttachmentPoints.end(); ) { + LLVOAvatar::attachment_map_t::iterator curiter = iter++; + LLViewerJointAttachment* attachment = curiter->second; LLViewerObject* objectp = attachment->getObject(); if (objectp) { |