diff options
author | Jacek Antonelli | 2008-08-15 23:45:50 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:50 -0500 |
commit | 2a4dea528f670b9bb1f77ef27a8a1dd16603d114 (patch) | |
tree | 95c68e362703c9099d571ecbdc6142b1cda1e005 /linden/indra/newview/llselectmgr.cpp | |
parent | Second Life viewer sources 1.20.6 (diff) | |
download | meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.zip meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.gz meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.bz2 meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.xz |
Second Life viewer sources 1.20.7
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llselectmgr.cpp | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/linden/indra/newview/llselectmgr.cpp b/linden/indra/newview/llselectmgr.cpp index 7d26f06..4488a46 100644 --- a/linden/indra/newview/llselectmgr.cpp +++ b/linden/indra/newview/llselectmgr.cpp | |||
@@ -39,7 +39,7 @@ | |||
39 | #include "lldbstrings.h" | 39 | #include "lldbstrings.h" |
40 | #include "lleconomy.h" | 40 | #include "lleconomy.h" |
41 | #include "llgl.h" | 41 | #include "llgl.h" |
42 | #include "llglimmediate.h" | 42 | #include "llrender.h" |
43 | #include "llpermissions.h" | 43 | #include "llpermissions.h" |
44 | #include "llpermissionsflags.h" | 44 | #include "llpermissionsflags.h" |
45 | #include "llundo.h" | 45 | #include "llundo.h" |
@@ -62,6 +62,7 @@ | |||
62 | #include "llhudmanager.h" | 62 | #include "llhudmanager.h" |
63 | #include "llinventorymodel.h" | 63 | #include "llinventorymodel.h" |
64 | #include "llmenugl.h" | 64 | #include "llmenugl.h" |
65 | #include "llmutelist.h" | ||
65 | #include "llstatusbar.h" | 66 | #include "llstatusbar.h" |
66 | #include "llsurface.h" | 67 | #include "llsurface.h" |
67 | #include "lltool.h" | 68 | #include "lltool.h" |
@@ -1037,19 +1038,21 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 & | |||
1037 | 1038 | ||
1038 | if (mGridMode == GRID_MODE_LOCAL && mSelectedObjects->getObjectCount()) | 1039 | if (mGridMode == GRID_MODE_LOCAL && mSelectedObjects->getObjectCount()) |
1039 | { | 1040 | { |
1040 | LLViewerObject* root = getSelectedParentObject(mSelectedObjects->getFirstObject()); | 1041 | //LLViewerObject* root = getSelectedParentObject(mSelectedObjects->getFirstObject()); |
1041 | LLBBox bbox = mSavedSelectionBBox; | 1042 | LLBBox bbox = mSavedSelectionBBox; |
1042 | mGridOrigin = mSavedSelectionBBox.getCenterAgent(); | 1043 | mGridOrigin = mSavedSelectionBBox.getCenterAgent(); |
1043 | mGridScale = mSavedSelectionBBox.getExtentLocal() * 0.5f; | 1044 | mGridScale = mSavedSelectionBBox.getExtentLocal() * 0.5f; |
1044 | 1045 | ||
1045 | if(mSelectedObjects->getObjectCount() < 2 || !root || root->mDrawable.isNull()) | 1046 | // DEV-12570 Just taking the saved selection box rotation prevents |
1047 | // wild rotations of linked sets while in local grid mode | ||
1048 | //if(mSelectedObjects->getObjectCount() < 2 || !root || root->mDrawable.isNull()) | ||
1046 | { | 1049 | { |
1047 | mGridRotation = mSavedSelectionBBox.getRotation(); | 1050 | mGridRotation = mSavedSelectionBBox.getRotation(); |
1048 | } | 1051 | } |
1049 | else //set to the root object | 1052 | /*else //set to the root object |
1050 | { | 1053 | { |
1051 | mGridRotation = root->getRenderRotation(); | 1054 | mGridRotation = root->getRenderRotation(); |
1052 | } | 1055 | }*/ |
1053 | } | 1056 | } |
1054 | else if (mGridMode == GRID_MODE_REF_OBJECT && first_grid_object && first_grid_object->mDrawable.notNull()) | 1057 | else if (mGridMode == GRID_MODE_REF_OBJECT && first_grid_object && first_grid_object->mDrawable.notNull()) |
1055 | { | 1058 | { |
@@ -2509,11 +2512,7 @@ BOOL LLSelectMgr::selectGetGroup(LLUUID& result_id) | |||
2509 | } | 2512 | } |
2510 | } | 2513 | } |
2511 | } | 2514 | } |
2512 | if (first_id.isNull()) | 2515 | |
2513 | { | ||
2514 | return FALSE; | ||
2515 | } | ||
2516 | |||
2517 | result_id = first_id; | 2516 | result_id = first_id; |
2518 | 2517 | ||
2519 | return identical; | 2518 | return identical; |
@@ -4443,6 +4442,11 @@ void LLSelectMgr::processObjectPropertiesFamily(LLMessageSystem* msg, void** use | |||
4443 | reporterp->setPickedObjectProperties(name, fullname, owner_id); | 4442 | reporterp->setPickedObjectProperties(name, fullname, owner_id); |
4444 | } | 4443 | } |
4445 | } | 4444 | } |
4445 | else if (request_flags & OBJECT_PAY_REQUEST) | ||
4446 | { | ||
4447 | // check if the owner of the paid object is muted | ||
4448 | LLMuteList::getInstance()->autoRemove(owner_id, LLMuteList::AR_MONEY); | ||
4449 | } | ||
4446 | 4450 | ||
4447 | // Now look through all of the hovered nodes | 4451 | // Now look through all of the hovered nodes |
4448 | struct f : public LLSelectedNodeFunctor | 4452 | struct f : public LLSelectedNodeFunctor |
@@ -4780,7 +4784,7 @@ void LLSelectMgr::updateSilhouettes() | |||
4780 | objectp->clearChanged(LLXform::MOVED | LLXform::SILHOUETTE); | 4784 | objectp->clearChanged(LLXform::MOVED | LLXform::SILHOUETTE); |
4781 | } | 4785 | } |
4782 | 4786 | ||
4783 | //glAlphaFunc(GL_GREATER, 0.01f); | 4787 | //gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); |
4784 | } | 4788 | } |
4785 | 4789 | ||
4786 | void LLSelectMgr::renderSilhouettes(BOOL for_hud) | 4790 | void LLSelectMgr::renderSilhouettes(BOOL for_hud) |
@@ -4792,7 +4796,7 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) | |||
4792 | 4796 | ||
4793 | LLViewerImage::bindTexture(mSilhouetteImagep); | 4797 | LLViewerImage::bindTexture(mSilhouetteImagep); |
4794 | LLGLSPipelineSelection gls_select; | 4798 | LLGLSPipelineSelection gls_select; |
4795 | glAlphaFunc(GL_GREATER, 0.0f); | 4799 | gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.f); |
4796 | LLGLEnable blend(GL_BLEND); | 4800 | LLGLEnable blend(GL_BLEND); |
4797 | LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); | 4801 | LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); |
4798 | 4802 | ||
@@ -4898,7 +4902,7 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) | |||
4898 | } | 4902 | } |
4899 | 4903 | ||
4900 | mSilhouetteImagep->unbindTexture(0, GL_TEXTURE_2D); | 4904 | mSilhouetteImagep->unbindTexture(0, GL_TEXTURE_2D); |
4901 | glAlphaFunc(GL_GREATER, 0.01f); | 4905 | gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); |
4902 | } | 4906 | } |
4903 | 4907 | ||
4904 | void LLSelectMgr::generateSilhouette(LLSelectNode* nodep, const LLVector3& view_point) | 4908 | void LLSelectMgr::generateSilhouette(LLSelectNode* nodep, const LLVector3& view_point) |
@@ -5263,7 +5267,7 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color) | |||
5263 | if (LLSelectMgr::sRenderHiddenSelections) // && gFloaterTools && gFloaterTools->getVisible()) | 5267 | if (LLSelectMgr::sRenderHiddenSelections) // && gFloaterTools && gFloaterTools->getVisible()) |
5264 | { | 5268 | { |
5265 | gGL.flush(); | 5269 | gGL.flush(); |
5266 | gGL.blendFunc(GL_SRC_COLOR, GL_ONE); | 5270 | gGL.blendFunc(LLRender::BF_SOURCE_COLOR, LLRender::BF_ONE); |
5267 | LLGLEnable fog(GL_FOG); | 5271 | LLGLEnable fog(GL_FOG); |
5268 | glFogi(GL_FOG_MODE, GL_LINEAR); | 5272 | glFogi(GL_FOG_MODE, GL_LINEAR); |
5269 | float d = (LLViewerCamera::getInstance()->getPointOfInterest()-LLViewerCamera::getInstance()->getOrigin()).magVec(); | 5273 | float d = (LLViewerCamera::getInstance()->getPointOfInterest()-LLViewerCamera::getInstance()->getOrigin()).magVec(); |
@@ -5273,7 +5277,7 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color) | |||
5273 | glFogfv(GL_FOG_COLOR, fogCol.mV); | 5277 | glFogfv(GL_FOG_COLOR, fogCol.mV); |
5274 | 5278 | ||
5275 | LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_GEQUAL); | 5279 | LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_GEQUAL); |
5276 | glAlphaFunc(GL_GREATER, 0.01f); | 5280 | gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); |
5277 | gGL.begin(LLVertexBuffer::LINES); | 5281 | gGL.begin(LLVertexBuffer::LINES); |
5278 | { | 5282 | { |
5279 | S32 i = 0; | 5283 | S32 i = 0; |
@@ -5294,7 +5298,7 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color) | |||
5294 | } | 5298 | } |
5295 | 5299 | ||
5296 | gGL.flush(); | 5300 | gGL.flush(); |
5297 | gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | 5301 | gGL.setSceneBlendType(LLRender::BT_ALPHA); |
5298 | gGL.begin(LLVertexBuffer::TRIANGLES); | 5302 | gGL.begin(LLVertexBuffer::TRIANGLES); |
5299 | { | 5303 | { |
5300 | S32 i = 0; | 5304 | S32 i = 0; |