diff options
author | Justin Clarke Casey | 2008-10-15 15:30:27 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-10-15 15:30:27 +0000 |
commit | 2226626fec4e8459873fdd7586c07c98401cdb5d (patch) | |
tree | cc079e70b4f12ec4796aa9a2cd26c4c461fd3e36 /OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs | |
parent | * refactor: rename SendImagePart to SendImageFirstPart since this is more des... (diff) | |
download | opensim-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/Modules/Agent/TextureSender/TextureSender.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs | 13 |
1 files changed, 4 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 | } |