aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-10-15 15:30:27 +0000
committerJustin Clarke Casey2008-10-15 15:30:27 +0000
commit2226626fec4e8459873fdd7586c07c98401cdb5d (patch)
treecc079e70b4f12ec4796aa9a2cd26c4c461fd3e36 /OpenSim/Region
parent* refactor: rename SendImagePart to SendImageFirstPart since this is more des... (diff)
downloadopensim-SC_OLD-2226626fec4e8459873fdd7586c07c98401cdb5d.zip
opensim-SC_OLD-2226626fec4e8459873fdd7586c07c98401cdb5d.tar.gz
opensim-SC_OLD-2226626fec4e8459873fdd7586c07c98401cdb5d.tar.bz2
opensim-SC_OLD-2226626fec4e8459873fdd7586c07c98401cdb5d.tar.xz
* refactor: move code concerned with creating a subsequent image packet to LLClientView
Diffstat (limited to 'OpenSim/Region')
-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
4 files changed, 23 insertions, 9 deletions
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 {