From 2226626fec4e8459873fdd7586c07c98401cdb5d Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Wed, 15 Oct 2008 15:30:27 +0000 Subject: * refactor: move code concerned with creating a subsequent image packet to LLClientView --- .../Modules/Agent/TextureSender/TextureSender.cs | 13 ++++--------- OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | 4 ++++ 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/Environment') 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 } else { - // Doesn't like to be refactored... - ImagePacketPacket im = new ImagePacketPacket(); - im.Header.Reliable = false; - im.ImageID.Packet = (ushort)(PacketCounter); - im.ImageID.ID = m_asset.FullID; int size = m_asset.Data.Length - 600 - (1000 * (PacketCounter - 1)); if (size > 1000) size = 1000; - im.ImageData.Data = new byte[size]; + byte[] imageData = new byte[size]; try { - Array.Copy(m_asset.Data, 600 + (1000 * (PacketCounter - 1)), im.ImageData.Data, 0, size); + Array.Copy(m_asset.Data, 600 + (1000 * (PacketCounter - 1)), imageData, 0, size); } catch (ArgumentOutOfRangeException) { @@ -189,8 +184,8 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender m_asset.FullID.ToString()); return; } - RequestUser.OutPacket(im, ThrottleOutPacketType.Texture); - + + RequestUser.SendImageNextPart((ushort)PacketCounter, m_asset.FullID, imageData); PacketCounter++; } } 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 { } + public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData) + { + } + public void SendShutdownConnectionNotice() { } -- cgit v1.1