aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
authorJeff Ames2008-03-25 03:49:08 +0000
committerJeff Ames2008-03-25 03:49:08 +0000
commit9d1b42c39a779c84dd091a817d2f6e5f434777c4 (patch)
tree0c1c0ad1db253daf3f8fa8389d2a5ae98b899c11 /OpenSim/Region/Environment/Modules
parentFix a couple more warnings. (diff)
downloadopensim-SC_OLD-9d1b42c39a779c84dd091a817d2f6e5f434777c4.zip
opensim-SC_OLD-9d1b42c39a779c84dd091a817d2f6e5f434777c4.tar.gz
opensim-SC_OLD-9d1b42c39a779c84dd091a817d2f6e5f434777c4.tar.bz2
opensim-SC_OLD-9d1b42c39a779c84dd091a817d2f6e5f434777c4.tar.xz
Comment out unused private methods.
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r--OpenSim/Region/Environment/Modules/AssetDownloadModule.cs204
-rw-r--r--OpenSim/Region/Environment/Modules/DynamicTextureModule.cs9
-rw-r--r--OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/FlattenSphere.cs65
3 files changed, 141 insertions, 137 deletions
diff --git a/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs b/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs
index 07f13ce..d5f1b36 100644
--- a/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs
+++ b/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs
@@ -175,117 +175,119 @@ namespace OpenSim.Region.Environment.Modules
175 } 175 }
176 } 176 }
177 177
178 private void RunAssetQueue() 178// TODO: unused
179 { 179// private void RunAssetQueue()
180 while (true) 180// {
181 { 181// while (true)
182 try 182// {
183 { 183// try
184 ProcessAssetQueue(); 184// {
185 Thread.Sleep(500); 185// ProcessAssetQueue();
186 } 186// Thread.Sleep(500);
187 catch (Exception) 187// }
188 { 188// catch (Exception)
189 // m_log.Error("[ASSET CACHE]: " + e.ToString()); 189// {
190 } 190// // m_log.Error("[ASSET CACHE]: " + e.ToString());
191 } 191// }
192 } 192// }
193// }
193 194
194 /// <summary> 195// TODO: unused
195 /// Process the asset queue which sends packets directly back to the client. 196// /// <summary>
196 /// </summary> 197// /// Process the asset queue which sends packets directly back to the client.
197 private void ProcessAssetQueue() 198// /// </summary>
198 { 199// private void ProcessAssetQueue()
199 //should move the asset downloading to a module, like has been done with texture downloading 200// {
200 if (AssetRequests.Count == 0) 201// //should move the asset downloading to a module, like has been done with texture downloading
201 { 202// if (AssetRequests.Count == 0)
202 //no requests waiting 203// {
203 return; 204// //no requests waiting
204 } 205// return;
205 // if less than 5, do all of them 206// }
206 int num = Math.Min(5, AssetRequests.Count); 207// // if less than 5, do all of them
208// int num = Math.Min(5, AssetRequests.Count);
207 209
208 AssetRequest req; 210// AssetRequest req;
209 for (int i = 0; i < num; i++) 211// for (int i = 0; i < num; i++)
210 { 212// {
211 req = (AssetRequest)AssetRequests[i]; 213// req = (AssetRequest)AssetRequests[i];
212 //Console.WriteLine("sending asset " + req.RequestAssetID); 214// //Console.WriteLine("sending asset " + req.RequestAssetID);
213 TransferInfoPacket Transfer = new TransferInfoPacket(); 215// TransferInfoPacket Transfer = new TransferInfoPacket();
214 Transfer.TransferInfo.ChannelType = 2; 216// Transfer.TransferInfo.ChannelType = 2;
215 Transfer.TransferInfo.Status = 0; 217// Transfer.TransferInfo.Status = 0;
216 Transfer.TransferInfo.TargetType = 0; 218// Transfer.TransferInfo.TargetType = 0;
217 if (req.AssetRequestSource == 2) 219// if (req.AssetRequestSource == 2)
218 { 220// {
219 Transfer.TransferInfo.Params = new byte[20]; 221// Transfer.TransferInfo.Params = new byte[20];
220 Array.Copy(req.RequestAssetID.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16); 222// Array.Copy(req.RequestAssetID.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16);
221 int assType = (int)req.AssetInf.Type; 223// int assType = (int)req.AssetInf.Type;
222 Array.Copy(Helpers.IntToBytes(assType), 0, Transfer.TransferInfo.Params, 16, 4); 224// Array.Copy(Helpers.IntToBytes(assType), 0, Transfer.TransferInfo.Params, 16, 4);
223 } 225// }
224 else if (req.AssetRequestSource == 3) 226// else if (req.AssetRequestSource == 3)
225 { 227// {
226 Transfer.TransferInfo.Params = req.Params; 228// Transfer.TransferInfo.Params = req.Params;
227 // Transfer.TransferInfo.Params = new byte[100]; 229// // Transfer.TransferInfo.Params = new byte[100];
228 //Array.Copy(req.RequestUser.AgentId.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16); 230// //Array.Copy(req.RequestUser.AgentId.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16);
229 //Array.Copy(req.RequestUser.SessionId.GetBytes(), 0, Transfer.TransferInfo.Params, 16, 16); 231// //Array.Copy(req.RequestUser.SessionId.GetBytes(), 0, Transfer.TransferInfo.Params, 16, 16);
230 } 232// }
231 Transfer.TransferInfo.Size = (int)req.AssetInf.Data.Length; 233// Transfer.TransferInfo.Size = (int)req.AssetInf.Data.Length;
232 Transfer.TransferInfo.TransferID = req.TransferRequestID; 234// Transfer.TransferInfo.TransferID = req.TransferRequestID;
233 req.RequestUser.OutPacket(Transfer, ThrottleOutPacketType.Asset); 235// req.RequestUser.OutPacket(Transfer, ThrottleOutPacketType.Asset);
234 236
235 if (req.NumPackets == 1) 237// if (req.NumPackets == 1)
236 { 238// {
237 TransferPacketPacket TransferPacket = new TransferPacketPacket(); 239// TransferPacketPacket TransferPacket = new TransferPacketPacket();
238 TransferPacket.TransferData.Packet = 0; 240// TransferPacket.TransferData.Packet = 0;
239 TransferPacket.TransferData.ChannelType = 2; 241// TransferPacket.TransferData.ChannelType = 2;
240 TransferPacket.TransferData.TransferID = req.TransferRequestID; 242// TransferPacket.TransferData.TransferID = req.TransferRequestID;
241 TransferPacket.TransferData.Data = req.AssetInf.Data; 243// TransferPacket.TransferData.Data = req.AssetInf.Data;
242 TransferPacket.TransferData.Status = 1; 244// TransferPacket.TransferData.Status = 1;
243 req.RequestUser.OutPacket(TransferPacket, ThrottleOutPacketType.Asset); 245// req.RequestUser.OutPacket(TransferPacket, ThrottleOutPacketType.Asset);
244 } 246// }
245 else 247// else
246 { 248// {
247 int processedLength = 0; 249// int processedLength = 0;
248 // libsecondlife hardcodes 1500 as the maximum data chunk size 250// // libsecondlife hardcodes 1500 as the maximum data chunk size
249 int maxChunkSize = 1250; 251// int maxChunkSize = 1250;
250 int packetNumber = 0; 252// int packetNumber = 0;
251 253
252 while (processedLength < req.AssetInf.Data.Length) 254// while (processedLength < req.AssetInf.Data.Length)
253 { 255// {
254 TransferPacketPacket TransferPacket = new TransferPacketPacket(); 256// TransferPacketPacket TransferPacket = new TransferPacketPacket();
255 TransferPacket.TransferData.Packet = packetNumber; 257// TransferPacket.TransferData.Packet = packetNumber;
256 TransferPacket.TransferData.ChannelType = 2; 258// TransferPacket.TransferData.ChannelType = 2;
257 TransferPacket.TransferData.TransferID = req.TransferRequestID; 259// TransferPacket.TransferData.TransferID = req.TransferRequestID;
258 260
259 int chunkSize = Math.Min(req.AssetInf.Data.Length - processedLength, maxChunkSize); 261// int chunkSize = Math.Min(req.AssetInf.Data.Length - processedLength, maxChunkSize);
260 byte[] chunk = new byte[chunkSize]; 262// byte[] chunk = new byte[chunkSize];
261 Array.Copy(req.AssetInf.Data, processedLength, chunk, 0, chunk.Length); 263// Array.Copy(req.AssetInf.Data, processedLength, chunk, 0, chunk.Length);
262 264
263 TransferPacket.TransferData.Data = chunk; 265// TransferPacket.TransferData.Data = chunk;
264 266
265 // 0 indicates more packets to come, 1 indicates last packet 267// // 0 indicates more packets to come, 1 indicates last packet
266 if (req.AssetInf.Data.Length - processedLength > maxChunkSize) 268// if (req.AssetInf.Data.Length - processedLength > maxChunkSize)
267 { 269// {
268 TransferPacket.TransferData.Status = 0; 270// TransferPacket.TransferData.Status = 0;
269 } 271// }
270 else 272// else
271 { 273// {
272 TransferPacket.TransferData.Status = 1; 274// TransferPacket.TransferData.Status = 1;
273 } 275// }
274 276
275 req.RequestUser.OutPacket(TransferPacket, ThrottleOutPacketType.Asset); 277// req.RequestUser.OutPacket(TransferPacket, ThrottleOutPacketType.Asset);
276 278
277 processedLength += chunkSize; 279// processedLength += chunkSize;
278 packetNumber++; 280// packetNumber++;
279 } 281// }
280 } 282// }
281 } 283// }
282 284
283 //remove requests that have been completed 285// //remove requests that have been completed
284 for (int i = 0; i < num; i++) 286// for (int i = 0; i < num; i++)
285 { 287// {
286 AssetRequests.RemoveAt(0); 288// AssetRequests.RemoveAt(0);
287 } 289// }
288 } 290// }
289 291
290 /// <summary> 292 /// <summary>
291 /// Calculate the number of packets required to send the asset to the client. 293 /// Calculate the number of packets required to send the asset to the client.
diff --git a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
index e16eb92..ee84499 100644
--- a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
+++ b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
@@ -228,10 +228,11 @@ namespace OpenSim.Region.Environment.Modules
228 part.ScheduleFullUpdate(); 228 part.ScheduleFullUpdate();
229 } 229 }
230 230
231 private byte[] BlendTextures(byte[] frontImage, byte[] backImage) 231// TODO: unused
232 { 232// private byte[] BlendTextures(byte[] frontImage, byte[] backImage)
233 return BlendTextures(frontImage, backImage, false, 0); 233// {
234 } 234// return BlendTextures(frontImage, backImage, false, 0);
235// }
235 236
236 private byte[] BlendTextures(byte[] frontImage, byte[] backImage, bool setNewAlpha, byte newAlpha) 237 private byte[] BlendTextures(byte[] frontImage, byte[] backImage, bool setNewAlpha, byte newAlpha)
237 { 238 {
diff --git a/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/FlattenSphere.cs b/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/FlattenSphere.cs
index 6cbd390..9bfb981 100644
--- a/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/FlattenSphere.cs
+++ b/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/FlattenSphere.cs
@@ -37,38 +37,39 @@ namespace OpenSim.Region.Environment.Modules.Terrain.PaintBrushes
37 return z; 37 return z;
38 } 38 }
39 39
40 private double GetBilinearInterpolate(double x, double y, ITerrainChannel map) 40// TODO: unused
41 { 41// private double GetBilinearInterpolate(double x, double y, ITerrainChannel map)
42 int w = map.Width; 42// {
43 int h = map.Height; 43// int w = map.Width;
44 44// int h = map.Height;
45 if (x > w - 2.0) 45
46 x = w - 2.0; 46// if (x > w - 2.0)
47 if (y > h - 2.0) 47// x = w - 2.0;
48 y = h - 2.0; 48// if (y > h - 2.0)
49 if (x < 0.0) 49// y = h - 2.0;
50 x = 0.0; 50// if (x < 0.0)
51 if (y < 0.0) 51// x = 0.0;
52 y = 0.0; 52// if (y < 0.0)
53 53// y = 0.0;
54 int stepSize = 1; 54
55 double h00 = map[(int)x, (int)y]; 55// int stepSize = 1;
56 double h10 = map[(int)x + stepSize, (int)y]; 56// double h00 = map[(int)x, (int)y];
57 double h01 = map[(int)x, (int)y + stepSize]; 57// double h10 = map[(int)x + stepSize, (int)y];
58 double h11 = map[(int)x + stepSize, (int)y + stepSize]; 58// double h01 = map[(int)x, (int)y + stepSize];
59 double h1 = h00; 59// double h11 = map[(int)x + stepSize, (int)y + stepSize];
60 double h2 = h10; 60// double h1 = h00;
61 double h3 = h01; 61// double h2 = h10;
62 double h4 = h11; 62// double h3 = h01;
63 double a00 = h1; 63// double h4 = h11;
64 double a10 = h2 - h1; 64// double a00 = h1;
65 double a01 = h3 - h1; 65// double a10 = h2 - h1;
66 double a11 = h1 - h2 - h3 + h4; 66// double a01 = h3 - h1;
67 double partialx = x - (int)x; 67// double a11 = h1 - h2 - h3 + h4;
68 double partialz = y - (int)y; 68// double partialx = x - (int)x;
69 double hi = a00 + (a10 * partialx) + (a01 * partialz) + (a11 * partialx * partialz); 69// double partialz = y - (int)y;
70 return hi; 70// double hi = a00 + (a10 * partialx) + (a01 * partialz) + (a11 * partialx * partialz);
71 } 71// return hi;
72// }
72 73
73 #region ITerrainPaintableEffect Members 74 #region ITerrainPaintableEffect Members
74 75