summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
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)