summaryrefslogtreecommitdiff
path: root/indra/newview/llvosky.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-08-25 15:58:08 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-08-25 15:58:08 +0100
commit1d89a80ba7293309fd4fbdd03b802c5c2998aac7 (patch)
tree70eb3619b9a3df35687836d9daa328eb52ba85ab /indra/newview/llvosky.cpp
parent6fcde580c3a2e6cc62bfab52bd47cae8726c56d4 (diff)
parente416840f85dc4a367894036b9fe483f17d959c54 (diff)
merge
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