Skip to content
Snippets Groups Projects
Commit e948c0c0 authored by Palmer's avatar Palmer
Browse files

Ext-2191 - Put some limits on WLSkyDetail

Reviewed by Mani
parent fc43d455
No related branches found
No related tags found
No related merge requests found
...@@ -49,12 +49,12 @@ const U32 LLVOWLSky::MAX_SKY_DETAIL = 180; ...@@ -49,12 +49,12 @@ const U32 LLVOWLSky::MAX_SKY_DETAIL = 180;
inline U32 LLVOWLSky::getNumStacks(void) inline U32 LLVOWLSky::getNumStacks(void)
{ {
return gSavedSettings.getU32("WLSkyDetail"); return min(MAX_SKY_DETAIL, max(MIN_SKY_DETAIL, gSavedSettings.getU32("WLSkyDetail")));
} }
inline U32 LLVOWLSky::getNumSlices(void) inline U32 LLVOWLSky::getNumSlices(void)
{ {
return 2 * gSavedSettings.getU32("WLSkyDetail"); return 2 * min(MAX_SKY_DETAIL, max(MIN_SKY_DETAIL, gSavedSettings.getU32("WLSkyDetail")));
} }
inline U32 LLVOWLSky::getFanNumVerts(void) inline U32 LLVOWLSky::getFanNumVerts(void)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment