diff options
author | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-05-16 17:17:22 +0300 |
---|---|---|
committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-05-16 17:17:22 +0300 |
commit | 912f021bb11ef48f352ea85cca27c2bca6ca06b1 (patch) | |
tree | 422165b7f4e2d7e3ad8a4821edc56158a0c80170 /indra/newview/llwaterparammanager.cpp | |
parent | cccca566bd2365c88cca819729c5432af9dfa52f (diff) |
STORM-1245 WIP Implement loading and applying region environment settings.
Diffstat (limited to 'indra/newview/llwaterparammanager.cpp')
-rw-r--r-- | indra/newview/llwaterparammanager.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index 587249856e..715af09053 100644 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -258,9 +258,20 @@ static LLFastTimer::DeclareTimer FTM_UPDATE_WATERPARAM("Update Water Params"); void LLWaterParamManager::applyUserPrefs() { - std::string water = LLEnvManagerNew::instance().getWaterPresetName(); - LL_DEBUGS("Windlight") << "Loading water preset [" << water << "]" << LL_ENDL; - loadPreset(water, true); + if (LLEnvManagerNew::instance().getUseRegionSettings()) + { + // *TODO: interpolate? + // *TODO: make sure whether region settings belong to the current region? + LL_DEBUGS("Windlight") << "Applying region water" << LL_ENDL; + const LLEnvironmentSettings& region_settings = LLEnvManagerNew::instance().getRegionSettings(); + LLWaterParamManager::getInstance()->mCurParams.setAll(region_settings.getWaterParams()); + } + else + { + std::string water = LLEnvManagerNew::instance().getWaterPresetName(); + LL_DEBUGS("Windlight") << "Loading water preset [" << water << "]" << LL_ENDL; + loadPreset(water, true); + } } void LLWaterParamManager::update(LLViewerCamera * cam) |