diff options
| author | Dave Parks <davep@lindenlab.com> | 2013-07-03 15:10:54 -0500 | 
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2013-07-03 15:10:54 -0500 | 
| commit | 4ad86739c1b6823540fb596481621c089d3a3183 (patch) | |
| tree | 64f3d0e295c4a49b3d2f42f85e51e8de0a03f249 | |
| parent | 8dedaadacd0fe8ac520c15d321465a2b00bd9c7e (diff) | |
NORSPEC-286 Make raycast code pay attention to diffuse alpha mode.
| -rwxr-xr-x | indra/newview/llvovolume.cpp | 24 | 
1 files changed, 23 insertions, 1 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index d890548710..b545e99a32 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3724,8 +3724,30 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&  			{  				LLFace* face = mDrawable->getFace(face_hit);				 +				bool ignore_alpha = false; + +				const LLTextureEntry* te = face->getTextureEntry(); +				if (te) +				{ +					LLMaterial* mat = te->getMaterialParams(); +					if (mat) +					{ +						U8 mode = mat->getDiffuseAlphaMode(); + +						if (mode == LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE || +							mode == LLMaterial::DIFFUSE_ALPHA_MODE_NONE) +						{ +							ignore_alpha = true; +						} +					} +				} +  				if (face && -					(pick_transparent || !face->getTexture() || !face->getTexture()->hasGLTexture() || face->getTexture()->getMask(face->surfaceToTexture(tc, p, n)))) +					(ignore_alpha || +					pick_transparent ||  +					!face->getTexture() ||  +					!face->getTexture()->hasGLTexture() ||  +					face->getTexture()->getMask(face->surfaceToTexture(tc, p, n))))  				{  					local_end = p;  					if (face_hitp != NULL)  | 
