diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llreflectionmap.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/llreflectionmap.cpp b/indra/newview/llreflectionmap.cpp index f346531bfd..ce749a96c7 100644 --- a/indra/newview/llreflectionmap.cpp +++ b/indra/newview/llreflectionmap.cpp @@ -30,6 +30,7 @@ #include "pipeline.h" #include "llviewerwindow.h" #include "llviewerregion.h" +#include "llworld.h" extern F32SecondsImplicit gFrameTimeSeconds; @@ -123,6 +124,12 @@ void LLReflectionMap::autoAdjustOrigin() mOrigin.mul(0.5f); } + // make sure origin isn't under ground + F32* fp = mOrigin.getF32ptr(); + LLVector3 origin(fp); + F32 height = LLWorld::instance().resolveLandHeightAgent(origin) + 2.f; + fp[2] = llmax(fp[2], height); + // make sure radius encompasses all objects LLSimdScalar r2 = 0.0; for (int i = 0; i < 8; ++i) |