summaryrefslogtreecommitdiff
path: root/indra/newview/llvosky.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-08-24 19:22:00 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-08-24 19:22:00 +0100
commite416840f85dc4a367894036b9fe483f17d959c54 (patch)
treee12956cbe7a0082bbaaa545cb80d9e86b13f88e8 /indra/newview/llvosky.cpp
parent98cc2365034a93c69704daa69efb389799cc9627 (diff)
Backed out changeset c3d41f18ce2b
back-out the back-out for this branch. yay.
Diffstat (limited to 'indra/newview/llvosky.cpp')
-rw-r--r--indra/newview/llvosky.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index a649c19014..7ae8c2c07d 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -969,7 +969,10 @@ void LLVOSky::calcAtmospherics(void)
}
temp2.mV[1] = llmax(0.f, lighty);
- temp2.mV[1] = 1.f / temp2.mV[1];
+ if(temp2.mV[1] > 0.f)
+ {
+ temp2.mV[1] = 1.f / temp2.mV[1];
+ }
componentMultBy(sunlight, componentExp((light_atten * -1.f) * temp2.mV[1]));
// Distance