diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index afccc1c42c4c2e36721a212ae9637e317a1d7d58..4ddd9c45689ace551658266273c677d862d07430 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3278,6 +3278,7 @@ void LLVOVolume::updateSpotLightPriority()
     F32 r = getLightRadius();
 	LLVector3 pos = mDrawable->getPositionAgent();
 
+#if OLD_SPOT_PRIO_CALC
 	LLVector3 at(0,0,-1);
 	at *= getRenderRotation();
 	pos += at * r;
@@ -3286,8 +3287,9 @@ void LLVOVolume::updateSpotLightPriority()
 	pos -= at * r;
 	
 	mSpotLightPriority = gPipeline.calcPixelArea(pos, LLVector3(r,r,r), *LLViewerCamera::getInstance());
-
-    //mSpotLightPriority = (gAgent.getPositionAgent() - pos).length() + r;
+#else
+    mSpotLightPriority = (gAgent.getPositionAgent() - pos).length() + r;
+#endif
 
 	if (mLightTexture.notNull())
 	{