aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs26
-rw-r--r--OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/TextureDownloadModule.cs31
-rw-r--r--OpenSim/Region/Environment/Scenes/AvatarAppearance.cs5
4 files changed, 30 insertions, 34 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index 2ec4fef..dc229f3 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -2728,19 +2728,19 @@ namespace OpenSim.Region.ClientStack
2728 for (int i = 0; i < imageRequest.RequestImage.Length; i++) 2728 for (int i = 0; i < imageRequest.RequestImage.Length; i++)
2729 { 2729 {
2730 // still working on the Texture download module so for now using old method 2730 // still working on the Texture download module so for now using old method
2731 // TextureRequestArgs args = new TextureRequestArgs(); 2731 if (OnRequestTexture != null)
2732 // args.RequestedAssetID = imageRequest.RequestImage[i].Image; 2732 {
2733 // args.DiscardLevel = imageRequest.RequestImage[i].DiscardLevel; 2733 TextureRequestArgs args = new TextureRequestArgs();
2734 // args.PacketNumber = imageRequest.RequestImage[i].Packet; 2734 args.RequestedAssetID = imageRequest.RequestImage[i].Image;
2735 2735 args.DiscardLevel = imageRequest.RequestImage[i].DiscardLevel;
2736 // if (OnRequestTexture != null) 2736 args.PacketNumber = imageRequest.RequestImage[i].Packet;
2737 // { 2737
2738 // OnRequestTexture(this, args); 2738 OnRequestTexture(this, args);
2739 // } 2739 }
2740 2740
2741 m_assetCache.AddTextureRequest(this, imageRequest.RequestImage[i].Image, 2741 // m_assetCache.AddTextureRequest(this, imageRequest.RequestImage[i].Image,
2742 imageRequest.RequestImage[i].Packet, 2742 // imageRequest.RequestImage[i].Packet,
2743 imageRequest.RequestImage[i].DiscardLevel); 2743 // imageRequest.RequestImage[i].DiscardLevel);
2744 } 2744 }
2745 break; 2745 break;
2746 case PacketType.TransferRequest: 2746 case PacketType.TransferRequest:
diff --git a/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs b/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs
index 4f9aa2a..9ed8c0b 100644
--- a/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs
+++ b/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs
@@ -80,7 +80,7 @@ namespace OpenSim.Region.Environment.Modules
80 { 80 {
81 if (profile.RootFolder != null) 81 if (profile.RootFolder != null)
82 { 82 {
83 //Todo look up the assetid from the inventory cache (or something) for each itemId that is in AvatarWearingArgs 83 //Todo look up the assetid from the inventory cache for each itemId that is in AvatarWearingArgs
84 // then store assetid and itemId and wearable type in a database 84 // then store assetid and itemId and wearable type in a database
85 foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) 85 foreach (AvatarWearingArgs.Wearable wear in e.NowWearing)
86 { 86 {
diff --git a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
index 902b669..66cdec7 100644
--- a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
+++ b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
@@ -27,6 +27,7 @@
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Threading;
30using libsecondlife; 31using libsecondlife;
31using libsecondlife.Packets; 32using libsecondlife.Packets;
32using Nini.Config; 33using Nini.Config;
@@ -50,13 +51,13 @@ namespace OpenSim.Region.Environment.Modules
50 51
51 private BlockingQueue<TextureSender> QueueSenders = new BlockingQueue<TextureSender>(); 52 private BlockingQueue<TextureSender> QueueSenders = new BlockingQueue<TextureSender>();
52 private Dictionary<LLUUID, List<LLUUID>> InProcess = new Dictionary<LLUUID, List<LLUUID>>(); 53 private Dictionary<LLUUID, List<LLUUID>> InProcess = new Dictionary<LLUUID, List<LLUUID>>();
53 // private Thread m_thread; 54 private Thread m_thread;
54 55
55 public TextureDownloadModule() 56 public TextureDownloadModule()
56 { 57 {
57 // m_thread = new Thread(new ThreadStart(ProcessTextureSenders)); 58 m_thread = new Thread(new ThreadStart(ProcessTextureSenders));
58 // m_thread.IsBackground = true; 59 m_thread.IsBackground = true;
59 // m_thread.Start(); 60 m_thread.Start();
60 } 61 }
61 62
62 public void Initialise(Scene scene, IConfigSource config) 63 public void Initialise(Scene scene, IConfigSource config)
@@ -89,7 +90,7 @@ namespace OpenSim.Region.Environment.Modules
89 90
90 public void NewClient(IClientAPI client) 91 public void NewClient(IClientAPI client)
91 { 92 {
92 /* lock (ClientRequests) 93 lock (ClientRequests)
93 { 94 {
94 if (!ClientRequests.ContainsKey(client.AgentId)) 95 if (!ClientRequests.ContainsKey(client.AgentId))
95 { 96 {
@@ -98,7 +99,7 @@ namespace OpenSim.Region.Environment.Modules
98 } 99 }
99 } 100 }
100 client.OnRequestTexture += TextureRequest; 101 client.OnRequestTexture += TextureRequest;
101 */ 102
102 } 103 }
103 104
104 public void TextureCallback(LLUUID textureID, AssetBase asset) 105 public void TextureCallback(LLUUID textureID, AssetBase asset)
@@ -124,7 +125,7 @@ namespace OpenSim.Region.Environment.Modules
124 125
125 public void TextureRequest(Object sender, TextureRequestArgs e) 126 public void TextureRequest(Object sender, TextureRequestArgs e)
126 { 127 {
127 IClientAPI client = (IClientAPI) sender; 128 IClientAPI client = (IClientAPI)sender;
128 if (!ClientRequests[client.AgentId].ContainsKey(e.RequestedAssetID)) 129 if (!ClientRequests[client.AgentId].ContainsKey(e.RequestedAssetID))
129 { 130 {
130 lock (ClientRequests) 131 lock (ClientRequests)
@@ -177,14 +178,14 @@ namespace OpenSim.Region.Environment.Modules
177 178
178 if (asset.Data.LongLength > 600) 179 if (asset.Data.LongLength > 600)
179 { 180 {
180 NumPackets = 2 + (int) (asset.Data.Length - 601)/1000; 181 NumPackets = 2 + (int)(asset.Data.Length - 601) / 1000;
181 } 182 }
182 else 183 else
183 { 184 {
184 NumPackets = 1; 185 NumPackets = 1;
185 } 186 }
186 187
187 PacketCounter = (int) req.PacketNumber; 188 PacketCounter = (int)req.PacketNumber;
188 } 189 }
189 190
190 public bool SendTexture() 191 public bool SendTexture()
@@ -209,7 +210,7 @@ namespace OpenSim.Region.Environment.Modules
209 im.Header.Reliable = false; 210 im.Header.Reliable = false;
210 im.ImageID.Packets = 1; 211 im.ImageID.Packets = 1;
211 im.ImageID.ID = m_asset.FullID; 212 im.ImageID.ID = m_asset.FullID;
212 im.ImageID.Size = (uint) m_asset.Data.Length; 213 im.ImageID.Size = (uint)m_asset.Data.Length;
213 im.ImageData.Data = m_asset.Data; 214 im.ImageData.Data = m_asset.Data;
214 im.ImageID.Codec = 2; 215 im.ImageID.Codec = 2;
215 req.RequestUser.OutPacket(im, ThrottleOutPacketType.Texture); 216 req.RequestUser.OutPacket(im, ThrottleOutPacketType.Texture);
@@ -219,9 +220,9 @@ namespace OpenSim.Region.Environment.Modules
219 { 220 {
220 ImageDataPacket im = new ImageDataPacket(); 221 ImageDataPacket im = new ImageDataPacket();
221 im.Header.Reliable = false; 222 im.Header.Reliable = false;
222 im.ImageID.Packets = (ushort) (NumPackets); 223 im.ImageID.Packets = (ushort)(NumPackets);
223 im.ImageID.ID = m_asset.FullID; 224 im.ImageID.ID = m_asset.FullID;
224 im.ImageID.Size = (uint) m_asset.Data.Length; 225 im.ImageID.Size = (uint)m_asset.Data.Length;
225 im.ImageData.Data = new byte[600]; 226 im.ImageData.Data = new byte[600];
226 Array.Copy(m_asset.Data, 0, im.ImageData.Data, 0, 600); 227 Array.Copy(m_asset.Data, 0, im.ImageData.Data, 0, 600);
227 im.ImageID.Codec = 2; 228 im.ImageID.Codec = 2;
@@ -233,12 +234,12 @@ namespace OpenSim.Region.Environment.Modules
233 { 234 {
234 ImagePacketPacket im = new ImagePacketPacket(); 235 ImagePacketPacket im = new ImagePacketPacket();
235 im.Header.Reliable = false; 236 im.Header.Reliable = false;
236 im.ImageID.Packet = (ushort) (PacketCounter); 237 im.ImageID.Packet = (ushort)(PacketCounter);
237 im.ImageID.ID = m_asset.FullID; 238 im.ImageID.ID = m_asset.FullID;
238 int size = m_asset.Data.Length - 600 - (1000*(PacketCounter - 1)); 239 int size = m_asset.Data.Length - 600 - (1000 * (PacketCounter - 1));
239 if (size > 1000) size = 1000; 240 if (size > 1000) size = 1000;
240 im.ImageData.Data = new byte[size]; 241 im.ImageData.Data = new byte[size];
241 Array.Copy(m_asset.Data, 600 + (1000*(PacketCounter - 1)), im.ImageData.Data, 0, size); 242 Array.Copy(m_asset.Data, 600 + (1000 * (PacketCounter - 1)), im.ImageData.Data, 0, size);
242 req.RequestUser.OutPacket(im, ThrottleOutPacketType.Texture); 243 req.RequestUser.OutPacket(im, ThrottleOutPacketType.Texture);
243 PacketCounter++; 244 PacketCounter++;
244 } 245 }
diff --git a/OpenSim/Region/Environment/Scenes/AvatarAppearance.cs b/OpenSim/Region/Environment/Scenes/AvatarAppearance.cs
index d8e69e6..84f635d 100644
--- a/OpenSim/Region/Environment/Scenes/AvatarAppearance.cs
+++ b/OpenSim/Region/Environment/Scenes/AvatarAppearance.cs
@@ -61,11 +61,6 @@ namespace OpenSim.Region.Environment.Scenes
61 } 61 }
62 62
63 63
64 public void SetID(LLUUID avatarID)
65 {
66 m_scenePresenceID = avatarID;
67 }
68
69 /// <summary> 64 /// <summary>
70 /// 65 ///
71 /// </summary> 66 /// </summary>