From b302f15deea0f4f7f5de75bfd3776c17021b6444 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Fri, 1 Feb 2008 02:23:35 +0000 Subject: EFFECTIVE MERGE: maint-viewer-3 -r 77368:77381 -> release ACTUAL MERGE: merge maint-viewer-3-merge -r 79051 -> release --- indra/newview/llselectmgr.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'indra/newview/llselectmgr.cpp') diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index ddd73fc0df..511fd73ef7 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -612,6 +612,10 @@ void LLSelectMgr::deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_s msg->addU32Fast(_PREHASH_ObjectLocalID, (objects[i])->getLocalID()); select_count++; + // Zap the angular velocity, as the sim will set it to zero + objects[i]->setAngularVelocity( 0,0,0 ); + objects[i]->setVelocity( 0,0,0 ); + if(msg->isSendFull(NULL) || select_count >= MAX_OBJECTS_PER_PACKET) { msg->sendReliable(regionp->getHost() ); @@ -635,6 +639,10 @@ void LLSelectMgr::deselectObjectOnly(LLViewerObject* object, BOOL send_to_sim) if (!object) return; if (!object->isSelected() ) return; + // Zap the angular velocity, as the sim will set it to zero + object->setAngularVelocity( 0,0,0 ); + object->setVelocity( 0,0,0 ); + if (send_to_sim) { LLViewerRegion* region = object->getRegion(); @@ -3276,6 +3284,15 @@ void LLSelectMgr::deselectAll() return; } + // Zap the angular velocity, as the sim will set it to zero + for (LLObjectSelection::iterator iter = mSelectedObjects->begin(); + iter != mSelectedObjects->end(); iter++ ) + { + LLViewerObject *objectp = (*iter)->getObject(); + objectp->setAngularVelocity( 0,0,0 ); + objectp->setVelocity( 0,0,0 ); + } + sendListToRegions( "ObjectDeselect", packAgentAndSessionID, @@ -3429,7 +3446,7 @@ void LLSelectMgr::sendAttach(U8 attachment_point) BOOL build_mode = gToolMgr->inEdit(); // Special case: Attach to default location for this object. if (0 == attachment_point || - gAgent.getAvatarObject()->mAttachmentPoints.getIfThere(attachment_point)) + get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, (S32)attachment_point, (LLViewerJointAttachment*)NULL)) { sendListToRegions( "ObjectAttach", -- cgit v1.2.3