diff options
author | Adam Frisby | 2008-05-01 16:35:00 +0000 |
---|---|---|
committer | Adam Frisby | 2008-05-01 16:35:00 +0000 |
commit | 13526097f24b7a8ad63b1d482c44b44397fa055f (patch) | |
tree | 7a82c20ed7c63e2aea5ad3863325e37f64e1cbea /OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs | |
parent | * Breaking all the code, breaking all the code..! (diff) | |
download | opensim-SC-13526097f24b7a8ad63b1d482c44b44397fa055f.zip opensim-SC-13526097f24b7a8ad63b1d482c44b44397fa055f.tar.gz opensim-SC-13526097f24b7a8ad63b1d482c44b44397fa055f.tar.bz2 opensim-SC-13526097f24b7a8ad63b1d482c44b44397fa055f.tar.xz |
* Spring cleaning on Region.Environment.
* Converted a large number of read-only fields to be actually, readonly.
* Reformatted code sections.
* Removed redundant code.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs b/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs index 02c541b..44b9a23 100644 --- a/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs +++ b/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs | |||
@@ -43,12 +43,14 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender | |||
43 | private static readonly ILog m_log | 43 | private static readonly ILog m_log |
44 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 45 | ||
46 | private readonly IClientAPI RequestUser; | ||
47 | |||
46 | /// <summary> | 48 | /// <summary> |
47 | /// Records the number of times texture send has been called. | 49 | /// Records the number of times texture send has been called. |
48 | /// </summary> | 50 | /// </summary> |
49 | public int counter = 0; | 51 | public int counter; |
50 | 52 | ||
51 | public bool ImageLoaded = false; | 53 | public bool ImageLoaded; |
52 | 54 | ||
53 | /// <summary> | 55 | /// <summary> |
54 | /// Holds the texture asset to send. | 56 | /// Holds the texture asset to send. |
@@ -57,27 +59,26 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender | |||
57 | 59 | ||
58 | //public LLUUID assetID { get { return m_asset.FullID; } } | 60 | //public LLUUID assetID { get { return m_asset.FullID; } } |
59 | 61 | ||
60 | private bool m_cancel = false; | 62 | private bool m_cancel; |
61 | 63 | ||
62 | // See ITextureSender | 64 | // See ITextureSender |
63 | 65 | ||
64 | private bool m_sending = false; | 66 | private bool m_sending; |
65 | 67 | ||
66 | /// <summary> | 68 | /// <summary> |
67 | /// This is actually the number of extra packets required to send the texture data! We always assume | 69 | /// This is actually the number of extra packets required to send the texture data! We always assume |
68 | /// at least one is required. | 70 | /// at least one is required. |
69 | /// </summary> | 71 | /// </summary> |
70 | private int NumPackets = 0; | 72 | private int NumPackets; |
71 | 73 | ||
72 | /// <summary> | 74 | /// <summary> |
73 | /// Holds the packet number to send next. In this case, each packet is 1000 bytes long and starts | 75 | /// Holds the packet number to send next. In this case, each packet is 1000 bytes long and starts |
74 | /// at the 600th byte (0th indexed). | 76 | /// at the 600th byte (0th indexed). |
75 | /// </summary> | 77 | /// </summary> |
76 | private int PacketCounter = 0; | 78 | private int PacketCounter; |
77 | 79 | ||
78 | private int RequestedDiscardLevel = -1; | 80 | private int RequestedDiscardLevel = -1; |
79 | private IClientAPI RequestUser; | 81 | private uint StartPacketNumber; |
80 | private uint StartPacketNumber = 0; | ||
81 | 82 | ||
82 | public TextureSender(IClientAPI client, int discardLevel, uint packetNumber) | 83 | public TextureSender(IClientAPI client, int discardLevel, uint packetNumber) |
83 | { | 84 | { |
@@ -190,7 +191,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender | |||
190 | catch (ArgumentOutOfRangeException) | 191 | catch (ArgumentOutOfRangeException) |
191 | { | 192 | { |
192 | m_log.Error("[TEXTURE SENDER]: Unable to separate texture into multiple packets: Array bounds failure on asset:" + | 193 | m_log.Error("[TEXTURE SENDER]: Unable to separate texture into multiple packets: Array bounds failure on asset:" + |
193 | m_asset.FullID.ToString()); | 194 | m_asset.FullID); |
194 | return; | 195 | return; |
195 | } | 196 | } |
196 | RequestUser.OutPacket(im, ThrottleOutPacketType.Texture); | 197 | RequestUser.OutPacket(im, ThrottleOutPacketType.Texture); |