diff options
author | Dave Parks <davep@lindenlab.com> | 2011-03-10 00:10:25 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-03-10 00:10:25 -0600 |
commit | 9044526994bb51b631a9a0cb7d6d6911a15957c6 (patch) | |
tree | 56f7f14c4fa86ed062898a59f9f7c613c36c8077 /indra/newview | |
parent | a135831c848717cf3809a4ae47d36e57e2076c5b (diff) |
SH-755 Set physics shape type to convex hull on delink if physics shape type was none.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llselectmgr.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 21a457c125..b139ba361e 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -3902,6 +3902,26 @@ void LLSelectMgr::sendDelink() return; } + struct f : public LLSelectedObjectFunctor + { //on delink, any modifyable object should + f() {} + + virtual bool apply(LLViewerObject* object) + { + if (object->permModify()) + { + if (object->getPhysicsShapeType() == LLViewerObject::PHYSICS_SHAPE_NONE) + { + object->setPhysicsShapeType(LLViewerObject::PHYSICS_SHAPE_CONVEX_HULL); + object->updateFlags(); + } + } + return true; + } + } sendfunc; + getSelection()->applyToObjects(&sendfunc); + + // Delink needs to send individuals so you can unlink a single object from // a linked set. sendListToRegions( |