aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World/Wind
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Wind')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Wind/WindModule.cs54
1 files changed, 28 insertions, 26 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Wind/WindModule.cs b/OpenSim/Region/Environment/Modules/World/Wind/WindModule.cs
index 190cc0b..d7bc42f 100644
--- a/OpenSim/Region/Environment/Modules/World/Wind/WindModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Wind/WindModule.cs
@@ -149,28 +149,11 @@ namespace OpenSim.Region.Environment.Modules
149 { 149 {
150 if (!avatar.IsChildAgent) 150 if (!avatar.IsChildAgent)
151 { 151 {
152 spotxp = (int)avatar.CameraPosition.X + 3; 152
153 spotxm = (int)avatar.CameraPosition.X - 3; 153 avatar.ControllingClient.SendWindData(
154 spotyp = (int)avatar.CameraPosition.Y + 3; 154 0,
155 spotym = (int)avatar.CameraPosition.Y - 3; 155 0,0,1,
156 if (spotxm < 0) 156 windarr);
157 spotxm = 0;
158 if (spotym < 0)
159 spotym = 0;
160 if (spotxp > 255)
161 spotxp = 255;
162 if (spotyp > 255)
163 spotyp = 255;
164 for (int x = spotxm; x<spotxp; x++)
165 {
166 for (int y = spotym; y<spotyp; y++)
167 {
168 avatar.ControllingClient.SendWindData(
169 x / Constants.TerrainPatchSize,
170 y / Constants.TerrainPatchSize,
171 windarr);
172 }
173 }
174 } 157 }
175 } 158 }
176 159
@@ -199,14 +182,33 @@ namespace OpenSim.Region.Environment.Modules
199 182
200 private void GenWindPos() 183 private void GenWindPos()
201 { 184 {
202 windarr = new float[256*256]; 185 //windarr = new float[256*256];
203 for (int x = 0; x < 256; x++) 186
187 Array.Clear(windarr, 0, 256 * 256);
188 //float i = 0f;
189 //float i2 = 2f;
190
191 for (int x = 0; x < 16; x++)
204 { 192 {
205 for (int y = 0; y < 256; y++) 193 for (int y = 0; y < 16; y++)
206 { 194 {
207 windarr[y*256 + x]= (float)(rndnums.NextDouble()* 2d - 1d); 195
196 windarr[x * 256 + y] = (float)(rndnums.NextDouble() * 2d - 1d);
197
208 } 198 }
199
209 } 200 }
201 for (int x = 16; x < 32; x++)
202 {
203 for (int y = 0; y < 16; y++)
204 {
205
206 windarr[x * 256 + y] = (float)(rndnums.NextDouble() * 2d - 1d);
207
208 }
209
210 }
211
210 212
211 // m_log.Debug("[SUN] Velocity("+Velocity.X+","+Velocity.Y+","+Velocity.Z+")"); 213 // m_log.Debug("[SUN] Velocity("+Velocity.X+","+Velocity.Y+","+Velocity.Z+")");
212 } 214 }