aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
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/Environment
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/Environment')
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs13
-rw-r--r--OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs4
2 files changed, 8 insertions, 9 deletions
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 }