summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 671f4d49a7..f97e0ff2e7 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3275,12 +3275,13 @@ F32 LLVOVolume::getSpotLightPriority() const
void LLVOVolume::updateSpotLightPriority()
{
+ F32 r = getLightRadius();
LLVector3 pos = mDrawable->getPositionAgent();
- LLVector3 at(0,0,-1);
- at *= getRenderRotation();
+ LLVector3 agent_pos = gAgent.getPositionAgent();
- F32 r = getLightRadius()*0.5f;
+ LLVector3 at(0,0,-1);
+ at *= getRenderRotation();
pos += at * r;
at = LLViewerCamera::getInstance()->getAtAxis();
@@ -3289,6 +3290,8 @@ void LLVOVolume::updateSpotLightPriority()
mSpotLightPriority = gPipeline.calcPixelArea(pos, LLVector3(r,r,r), *LLViewerCamera::getInstance());
+ //mSpotLightPriority = (agent_pos - pos).length() + r;
+
if (mLightTexture.notNull())
{
mLightTexture->addTextureStats(mSpotLightPriority);