diff options
author | Tom Grimshaw | 2010-05-26 16:25:27 +0100 |
---|---|---|
committer | Jacek Antonelli | 2010-06-19 02:43:25 -0500 |
commit | 453a613b6431060d7086290b54fde4ab14bc7b4a (patch) | |
tree | d32aca4a2ee9a87c5b6f0cf8884f03bd415f3e66 | |
parent | Added missing 'isOwnedSelf' option to logcontrol.xml (diff) | |
download | meta-impy-453a613b6431060d7086290b54fde4ab14bc7b4a.zip meta-impy-453a613b6431060d7086290b54fde4ab14bc7b4a.tar.gz meta-impy-453a613b6431060d7086290b54fde4ab14bc7b4a.tar.bz2 meta-impy-453a613b6431060d7086290b54fde4ab14bc7b4a.tar.xz |
LightShare: Add proper decoding of the water normal map UUID
-rw-r--r-- | linden/indra/newview/llviewergenericmessage.cpp | 27 | ||||
-rw-r--r-- | linden/indra/newview/meta7windlight.h | 2 |
2 files changed, 27 insertions, 2 deletions
diff --git a/linden/indra/newview/llviewergenericmessage.cpp b/linden/indra/newview/llviewergenericmessage.cpp index 84f464f..c9954b3 100644 --- a/linden/indra/newview/llviewergenericmessage.cpp +++ b/linden/indra/newview/llviewergenericmessage.cpp | |||
@@ -88,6 +88,7 @@ void process_generic_message(LLMessageSystem* msg, void**) | |||
88 | std::string method; | 88 | std::string method; |
89 | msg->getStringFast(_PREHASH_MethodData, _PREHASH_Method, method); | 89 | msg->getStringFast(_PREHASH_MethodData, _PREHASH_Method, method); |
90 | 90 | ||
91 | //This needs to be handled by a dispatcher really, but I'm not sure where is the best place to put it | ||
91 | if (method == "Windlight" && gSavedSettings.getBOOL("UseServersideWindlightSettings")) | 92 | if (method == "Windlight" && gSavedSettings.getBOOL("UseServersideWindlightSettings")) |
92 | { | 93 | { |
93 | //Meta7 WindLight packet | 94 | //Meta7 WindLight packet |
@@ -121,8 +122,32 @@ void process_generic_message(LLMessageSystem* msg, void**) | |||
121 | param_set.set("blurMultiplier", wl->blurMultiplier); | 122 | param_set.set("blurMultiplier", wl->blurMultiplier); |
122 | param_set.set("wave1Dir", wl->littleWaveDirection.X, wl->littleWaveDirection.Y); | 123 | param_set.set("wave1Dir", wl->littleWaveDirection.X, wl->littleWaveDirection.Y); |
123 | param_set.set("wave2Dir", wl->bigWaveDirection.X, wl->bigWaveDirection.Y); | 124 | param_set.set("wave2Dir", wl->bigWaveDirection.X, wl->bigWaveDirection.Y); |
124 | 125 | ||
126 | LLUUID normalMapTexture; | ||
127 | |||
128 | std::string out = llformat( | ||
129 | "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x", | ||
130 | (U8)(wl->normalMapTexture[0]), | ||
131 | (U8)(wl->normalMapTexture[1]), | ||
132 | (U8)(wl->normalMapTexture[2]), | ||
133 | (U8)(wl->normalMapTexture[3]), | ||
134 | (U8)(wl->normalMapTexture[4]), | ||
135 | (U8)(wl->normalMapTexture[5]), | ||
136 | (U8)(wl->normalMapTexture[6]), | ||
137 | (U8)(wl->normalMapTexture[7]), | ||
138 | (U8)(wl->normalMapTexture[8]), | ||
139 | (U8)(wl->normalMapTexture[9]), | ||
140 | (U8)(wl->normalMapTexture[10]), | ||
141 | (U8)(wl->normalMapTexture[11]), | ||
142 | (U8)(wl->normalMapTexture[12]), | ||
143 | (U8)(wl->normalMapTexture[13]), | ||
144 | (U8)(wl->normalMapTexture[14]), | ||
145 | (U8)(wl->normalMapTexture[15])); | ||
146 | |||
147 | normalMapTexture.set(out); | ||
148 | |||
125 | param_mgr->setParamSet( "Meta7CurrentRegion", param_set); | 149 | param_mgr->setParamSet( "Meta7CurrentRegion", param_set); |
150 | param_mgr->setNormalMapID(normalMapTexture); | ||
126 | 151 | ||
127 | LLWLParamManager * wl_param_mgr = LLWLParamManager::instance(); | 152 | LLWLParamManager * wl_param_mgr = LLWLParamManager::instance(); |
128 | LLWLParamSet & wl_param_set = wl_param_mgr->mCurParams; | 153 | LLWLParamSet & wl_param_set = wl_param_mgr->mCurParams; |
diff --git a/linden/indra/newview/meta7windlight.h b/linden/indra/newview/meta7windlight.h index 9bbdf69..9927558 100644 --- a/linden/indra/newview/meta7windlight.h +++ b/linden/indra/newview/meta7windlight.h | |||
@@ -65,7 +65,7 @@ struct Meta7WindlightPacket { | |||
65 | F32 blurMultiplier; | 65 | F32 blurMultiplier; |
66 | M7Vector2 littleWaveDirection; | 66 | M7Vector2 littleWaveDirection; |
67 | M7Vector2 bigWaveDirection; | 67 | M7Vector2 bigWaveDirection; |
68 | LLUUID normalMapTexture; | 68 | unsigned char normalMapTexture[16]; |
69 | M7Color4 horizon; | 69 | M7Color4 horizon; |
70 | F32 hazeHorizon; | 70 | F32 hazeHorizon; |
71 | M7Color4 blueDensity; | 71 | M7Color4 blueDensity; |