aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/IClientAPI.cs9
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs11
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs13
-rw-r--r--OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs4
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs4
5 files changed, 32 insertions, 9 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index d370aed..d5d4c34 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -802,6 +802,15 @@ namespace OpenSim.Framework
802 /// <param name="ImageData"></param> 802 /// <param name="ImageData"></param>
803 /// <param name="imageCodec"></param> 803 /// <param name="imageCodec"></param>
804 void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec); 804 void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec);
805
806 /// <summary>
807 /// Send the next packet for a series of packets making up a single texture,
808 /// as established by SendImageFirstPart()
809 /// </summary>
810 /// <param name="partNumber"></param>
811 /// <param name="imageUuid"></param>
812 /// <param name="imageData"></param>
813 void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData);
805 814
806 void SendShutdownConnectionNotice(); 815 void SendShutdownConnectionNotice();
807 816
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 4c68fae..cb162ab 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -2619,6 +2619,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2619 im.Header.Zerocoded = true; 2619 im.Header.Zerocoded = true;
2620 OutPacket(im, ThrottleOutPacketType.Texture); 2620 OutPacket(im, ThrottleOutPacketType.Texture);
2621 } 2621 }
2622
2623 public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData)
2624 {
2625 ImagePacketPacket im = new ImagePacketPacket();
2626 im.Header.Reliable = false;
2627 im.ImageID.Packet = partNumber;
2628 im.ImageID.ID = imageUuid;
2629 im.ImageData.Data = imageData;
2630
2631 OutPacket(im, ThrottleOutPacketType.Texture);
2632 }
2622 2633
2623 public void SendShutdownConnectionNotice() 2634 public void SendShutdownConnectionNotice()
2624 { 2635 {
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs b/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs
index 2835cfa..cd61798 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs
@@ -171,17 +171,12 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender
171 } 171 }
172 else 172 else
173 { 173 {
174 // Doesn't like to be refactored...
175 ImagePacketPacket im = new ImagePacketPacket();
176 im.Header.Reliable = false;
177 im.ImageID.Packet = (ushort)(PacketCounter);
178 im.ImageID.ID = m_asset.FullID;
179 int size = m_asset.Data.Length - 600 - (1000 * (PacketCounter - 1)); 174 int size = m_asset.Data.Length - 600 - (1000 * (PacketCounter - 1));
180 if (size > 1000) size = 1000; 175 if (size > 1000) size = 1000;
181 im.ImageData.Data = new byte[size]; 176 byte[] imageData = new byte[size];
182 try 177 try
183 { 178 {
184 Array.Copy(m_asset.Data, 600 + (1000 * (PacketCounter - 1)), im.ImageData.Data, 0, size); 179 Array.Copy(m_asset.Data, 600 + (1000 * (PacketCounter - 1)), imageData, 0, size);
185 } 180 }
186 catch (ArgumentOutOfRangeException) 181 catch (ArgumentOutOfRangeException)
187 { 182 {
@@ -189,8 +184,8 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender
189 m_asset.FullID.ToString()); 184 m_asset.FullID.ToString());
190 return; 185 return;
191 } 186 }
192 RequestUser.OutPacket(im, ThrottleOutPacketType.Texture); 187
193 188 RequestUser.SendImageNextPart((ushort)PacketCounter, m_asset.FullID, imageData);
194 PacketCounter++; 189 PacketCounter++;
195 } 190 }
196 } 191 }
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
index 627785c..2135974 100644
--- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
@@ -708,6 +708,10 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
708 { 708 {
709 } 709 }
710 710
711 public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData)
712 {
713 }
714
711 public void SendShutdownConnectionNotice() 715 public void SendShutdownConnectionNotice()
712 { 716 {
713 } 717 }
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 2ce63a5..b17436c 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -625,6 +625,10 @@ namespace OpenSim.Region.Examples.SimpleModule
625 public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) 625 public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec)
626 { 626 {
627 } 627 }
628
629 public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData)
630 {
631 }
628 632
629 public void SendShutdownConnectionNotice() 633 public void SendShutdownConnectionNotice()
630 { 634 {