diff options
author | Adam Frisby | 2008-04-30 23:11:07 +0000 |
---|---|---|
committer | Adam Frisby | 2008-04-30 23:11:07 +0000 |
commit | 25a49ac4de056f43d6c5803fcd34804fcea96ae2 (patch) | |
tree | 3b3f24601da9ebdcc8818b86fe201da2c63d7dda /OpenSim/Region/Environment | |
parent | * Fix #3 (diff) | |
download | opensim-SC_OLD-25a49ac4de056f43d6c5803fcd34804fcea96ae2.zip opensim-SC_OLD-25a49ac4de056f43d6c5803fcd34804fcea96ae2.tar.gz opensim-SC_OLD-25a49ac4de056f43d6c5803fcd34804fcea96ae2.tar.bz2 opensim-SC_OLD-25a49ac4de056f43d6c5803fcd34804fcea96ae2.tar.xz |
* Spring cleaned a bunch of '//TODO: unused' marked functions.
Diffstat (limited to 'OpenSim/Region/Environment')
4 files changed, 0 insertions, 175 deletions
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs b/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs index 33e917a..c0b7380 100644 --- a/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs | |||
@@ -178,120 +178,6 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload | |||
178 | } | 178 | } |
179 | } | 179 | } |
180 | 180 | ||
181 | // TODO: unused | ||
182 | // private void RunAssetQueue() | ||
183 | // { | ||
184 | // while (true) | ||
185 | // { | ||
186 | // try | ||
187 | // { | ||
188 | // ProcessAssetQueue(); | ||
189 | // Thread.Sleep(500); | ||
190 | // } | ||
191 | // catch (Exception) | ||
192 | // { | ||
193 | // // m_log.Error("[ASSET CACHE]: " + e.ToString()); | ||
194 | // } | ||
195 | // } | ||
196 | // } | ||
197 | |||
198 | // TODO: unused | ||
199 | // /// <summary> | ||
200 | // /// Process the asset queue which sends packets directly back to the client. | ||
201 | // /// </summary> | ||
202 | // private void ProcessAssetQueue() | ||
203 | // { | ||
204 | // //should move the asset downloading to a module, like has been done with texture downloading | ||
205 | // if (AssetRequests.Count == 0) | ||
206 | // { | ||
207 | // //no requests waiting | ||
208 | // return; | ||
209 | // } | ||
210 | // // if less than 5, do all of them | ||
211 | // int num = Math.Min(5, AssetRequests.Count); | ||
212 | |||
213 | // AssetRequest req; | ||
214 | // for (int i = 0; i < num; i++) | ||
215 | // { | ||
216 | // req = (AssetRequest)AssetRequests[i]; | ||
217 | // //Console.WriteLine("sending asset " + req.RequestAssetID); | ||
218 | // TransferInfoPacket Transfer = new TransferInfoPacket(); | ||
219 | // Transfer.TransferInfo.ChannelType = 2; | ||
220 | // Transfer.TransferInfo.Status = 0; | ||
221 | // Transfer.TransferInfo.TargetType = 0; | ||
222 | // if (req.AssetRequestSource == 2) | ||
223 | // { | ||
224 | // Transfer.TransferInfo.Params = new byte[20]; | ||
225 | // Array.Copy(req.RequestAssetID.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16); | ||
226 | // int assType = (int)req.AssetInf.Type; | ||
227 | // Array.Copy(Helpers.IntToBytes(assType), 0, Transfer.TransferInfo.Params, 16, 4); | ||
228 | // } | ||
229 | // else if (req.AssetRequestSource == 3) | ||
230 | // { | ||
231 | // Transfer.TransferInfo.Params = req.Params; | ||
232 | // // Transfer.TransferInfo.Params = new byte[100]; | ||
233 | // //Array.Copy(req.RequestUser.AgentId.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16); | ||
234 | // //Array.Copy(req.RequestUser.SessionId.GetBytes(), 0, Transfer.TransferInfo.Params, 16, 16); | ||
235 | // } | ||
236 | // Transfer.TransferInfo.Size = (int)req.AssetInf.Data.Length; | ||
237 | // Transfer.TransferInfo.TransferID = req.TransferRequestID; | ||
238 | // req.RequestUser.OutPacket(Transfer, ThrottleOutPacketType.Asset); | ||
239 | |||
240 | // if (req.NumPackets == 1) | ||
241 | // { | ||
242 | // TransferPacketPacket TransferPacket = new TransferPacketPacket(); | ||
243 | // TransferPacket.TransferData.Packet = 0; | ||
244 | // TransferPacket.TransferData.ChannelType = 2; | ||
245 | // TransferPacket.TransferData.TransferID = req.TransferRequestID; | ||
246 | // TransferPacket.TransferData.Data = req.AssetInf.Data; | ||
247 | // TransferPacket.TransferData.Status = 1; | ||
248 | // req.RequestUser.OutPacket(TransferPacket, ThrottleOutPacketType.Asset); | ||
249 | // } | ||
250 | // else | ||
251 | // { | ||
252 | // int processedLength = 0; | ||
253 | // // libsecondlife hardcodes 1500 as the maximum data chunk size | ||
254 | // int maxChunkSize = 1250; | ||
255 | // int packetNumber = 0; | ||
256 | |||
257 | // while (processedLength < req.AssetInf.Data.Length) | ||
258 | // { | ||
259 | // TransferPacketPacket TransferPacket = new TransferPacketPacket(); | ||
260 | // TransferPacket.TransferData.Packet = packetNumber; | ||
261 | // TransferPacket.TransferData.ChannelType = 2; | ||
262 | // TransferPacket.TransferData.TransferID = req.TransferRequestID; | ||
263 | |||
264 | // int chunkSize = Math.Min(req.AssetInf.Data.Length - processedLength, maxChunkSize); | ||
265 | // byte[] chunk = new byte[chunkSize]; | ||
266 | // Array.Copy(req.AssetInf.Data, processedLength, chunk, 0, chunk.Length); | ||
267 | |||
268 | // TransferPacket.TransferData.Data = chunk; | ||
269 | |||
270 | // // 0 indicates more packets to come, 1 indicates last packet | ||
271 | // if (req.AssetInf.Data.Length - processedLength > maxChunkSize) | ||
272 | // { | ||
273 | // TransferPacket.TransferData.Status = 0; | ||
274 | // } | ||
275 | // else | ||
276 | // { | ||
277 | // TransferPacket.TransferData.Status = 1; | ||
278 | // } | ||
279 | |||
280 | // req.RequestUser.OutPacket(TransferPacket, ThrottleOutPacketType.Asset); | ||
281 | |||
282 | // processedLength += chunkSize; | ||
283 | // packetNumber++; | ||
284 | // } | ||
285 | // } | ||
286 | // } | ||
287 | |||
288 | // //remove requests that have been completed | ||
289 | // for (int i = 0; i < num; i++) | ||
290 | // { | ||
291 | // AssetRequests.RemoveAt(0); | ||
292 | // } | ||
293 | // } | ||
294 | |||
295 | /// <summary> | 181 | /// <summary> |
296 | /// Calculate the number of packets required to send the asset to the client. | 182 | /// Calculate the number of packets required to send the asset to the client. |
297 | /// </summary> | 183 | /// </summary> |
diff --git a/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs index 735a3cf..68ca5e9 100644 --- a/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs +++ b/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs | |||
@@ -239,12 +239,6 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture | |||
239 | part.ScheduleFullUpdate(); | 239 | part.ScheduleFullUpdate(); |
240 | } | 240 | } |
241 | 241 | ||
242 | // TODO: unused | ||
243 | // private byte[] BlendTextures(byte[] frontImage, byte[] backImage) | ||
244 | // { | ||
245 | // return BlendTextures(frontImage, backImage, false, 0); | ||
246 | // } | ||
247 | |||
248 | private byte[] BlendTextures(byte[] frontImage, byte[] backImage, bool setNewAlpha, byte newAlpha) | 242 | private byte[] BlendTextures(byte[] frontImage, byte[] backImage, bool setNewAlpha, byte newAlpha) |
249 | { | 243 | { |
250 | Bitmap image1 = new Bitmap(OpenJPEG.DecodeToImage(frontImage)); | 244 | Bitmap image1 = new Bitmap(OpenJPEG.DecodeToImage(frontImage)); |
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs index 6a5a166..d4f3b9f 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs | |||
@@ -31,39 +31,6 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes | |||
31 | { | 31 | { |
32 | public class FlattenSphere : ITerrainPaintableEffect | 32 | public class FlattenSphere : ITerrainPaintableEffect |
33 | { | 33 | { |
34 | // TODO: unused | ||
35 | // private double GetBilinearInterpolate(double x, double y, ITerrainChannel map) | ||
36 | // { | ||
37 | // int w = map.Width; | ||
38 | // int h = map.Height; | ||
39 | |||
40 | // if (x > w - 2.0) | ||
41 | // x = w - 2.0; | ||
42 | // if (y > h - 2.0) | ||
43 | // y = h - 2.0; | ||
44 | // if (x < 0.0) | ||
45 | // x = 0.0; | ||
46 | // if (y < 0.0) | ||
47 | // y = 0.0; | ||
48 | |||
49 | // int stepSize = 1; | ||
50 | // double h00 = map[(int)x, (int)y]; | ||
51 | // double h10 = map[(int)x + stepSize, (int)y]; | ||
52 | // double h01 = map[(int)x, (int)y + stepSize]; | ||
53 | // double h11 = map[(int)x + stepSize, (int)y + stepSize]; | ||
54 | // double h1 = h00; | ||
55 | // double h2 = h10; | ||
56 | // double h3 = h01; | ||
57 | // double h4 = h11; | ||
58 | // double a00 = h1; | ||
59 | // double a10 = h2 - h1; | ||
60 | // double a01 = h3 - h1; | ||
61 | // double a11 = h1 - h2 - h3 + h4; | ||
62 | // double partialx = x - (int)x; | ||
63 | // double partialz = y - (int)y; | ||
64 | // double hi = a00 + (a10 * partialx) + (a01 * partialz) + (a11 * partialx * partialz); | ||
65 | // return hi; | ||
66 | // } | ||
67 | 34 | ||
68 | #region ITerrainPaintableEffect Members | 35 | #region ITerrainPaintableEffect Members |
69 | 36 | ||
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 4a80b8d..2ce6314 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -794,28 +794,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
794 | } | 794 | } |
795 | } | 795 | } |
796 | 796 | ||
797 | //Updates the time in the viewer. | ||
798 | // TODO: unused | ||
799 | // private void UpdateInWorldTime() | ||
800 | // { | ||
801 | // m_timeUpdateCount++; | ||
802 | // if (m_timeUpdateCount > 600) | ||
803 | // { | ||
804 | // List<ScenePresence> avatars = GetAvatars(); | ||
805 | // foreach (ScenePresence avatar in avatars) | ||
806 | // { | ||
807 | // avatar.ControllingClient.SendViewerTime(m_timePhase); | ||
808 | // } | ||
809 | |||
810 | // m_timeUpdateCount = 0; | ||
811 | // m_timePhase++; | ||
812 | // if (m_timePhase > 94) | ||
813 | // { | ||
814 | // m_timePhase = 0; | ||
815 | // } | ||
816 | // } | ||
817 | // } | ||
818 | |||
819 | private void SendSimStatsPackets(SimStatsPacket pack) | 797 | private void SendSimStatsPackets(SimStatsPacket pack) |
820 | { | 798 | { |
821 | List<ScenePresence> StatSendAgents = GetScenePresences(); | 799 | List<ScenePresence> StatSendAgents = GetScenePresences(); |