summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2014-01-03 12:14:03 -0500
committerOz Linden <oz@lindenlab.com>2014-01-03 12:14:03 -0500
commit30f0d61510a2f7d28bd24d2165807e7e6ced4e55 (patch)
treed1640aaa6cd78e33bfe52defdeba5eb807459885 /indra/newview/llvovolume.cpp
parent5f635f7942130ab25f74f5c6aaeb5b135d0cb43e (diff)
parent1a9b9f1bd1b5f64b35b9ce6eff458cdb7a79fe6e (diff)
merge changes for 3.6.12-release
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rwxr-xr-xindra/newview/llvovolume.cpp30
1 files changed, 27 insertions, 3 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index dfac77857c..c233221e5f 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -2618,6 +2618,7 @@ void LLVOVolume::setLightTextureID(LLUUID id)
if (hasLightTexture())
{
setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE, FALSE, true);
+ parameterChanged(LLNetworkData::PARAMS_LIGHT_IMAGE, true);
mLightTexture = NULL;
}
}
@@ -2635,7 +2636,8 @@ void LLVOVolume::setSpotLightParams(LLVector3 params)
void LLVOVolume::setIsLight(BOOL is_light)
{
- if (is_light != getIsLight())
+ BOOL was_light = getIsLight();
+ if (is_light != was_light)
{
if (is_light)
{
@@ -2820,7 +2822,7 @@ void LLVOVolume::updateSpotLightPriority()
bool LLVOVolume::isLightSpotlight() const
{
LLLightImageParams* params = (LLLightImageParams*) getParameterEntry(LLNetworkData::PARAMS_LIGHT_IMAGE);
- if (params)
+ if (params && getParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE))
{
return params->isLightSpotlight();
}
@@ -3750,8 +3752,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)