mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 11:33:28 +08:00
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs OpenSim/Region/Framework/Scenes/Scene.cs OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs OpenSim/Services/Interfaces/IUserAccountService.cs
This commit is contained in:
@@ -56,9 +56,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
public IAssetService AssetService;
|
||||
public UUID AgentID;
|
||||
public IInventoryAccessModule InventoryAccessModule;
|
||||
public OpenJPEG.J2KLayerInfo[] Layers;
|
||||
public bool IsDecoded;
|
||||
public bool HasAsset;
|
||||
private OpenJPEG.J2KLayerInfo[] m_layers;
|
||||
public bool IsDecoded { get; private set; }
|
||||
public bool HasAsset { get; private set; }
|
||||
public C5.IPriorityQueueHandle<J2KImage> PriorityQueueHandle;
|
||||
|
||||
private uint m_currentPacket;
|
||||
@@ -170,14 +170,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
if (DiscardLevel >= 0 || m_stopPacket == 0)
|
||||
{
|
||||
// This shouldn't happen, but if it does, we really can't proceed
|
||||
if (Layers == null)
|
||||
if (m_layers == null)
|
||||
{
|
||||
m_log.Warn("[J2KIMAGE]: RunUpdate() called with missing Layers. Canceling texture transfer");
|
||||
m_currentPacket = m_stopPacket;
|
||||
return;
|
||||
}
|
||||
|
||||
int maxDiscardLevel = Math.Max(0, Layers.Length - 1);
|
||||
int maxDiscardLevel = Math.Max(0, m_layers.Length - 1);
|
||||
|
||||
// Treat initial texture downloads with a DiscardLevel of -1 a request for the highest DiscardLevel
|
||||
if (DiscardLevel < 0 && m_stopPacket == 0)
|
||||
@@ -187,9 +187,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
DiscardLevel = (sbyte)Math.Min(DiscardLevel, maxDiscardLevel);
|
||||
|
||||
//Calculate the m_stopPacket
|
||||
if (Layers.Length > 0)
|
||||
if (m_layers.Length > 0)
|
||||
{
|
||||
m_stopPacket = (uint)GetPacketForBytePosition(Layers[(Layers.Length - 1) - DiscardLevel].End);
|
||||
m_stopPacket = (uint)GetPacketForBytePosition(m_layers[(m_layers.Length - 1) - DiscardLevel].End);
|
||||
//I don't know why, but the viewer seems to expect the final packet if the file
|
||||
//is just one packet bigger.
|
||||
if (TexturePacketCount() == m_stopPacket + 1)
|
||||
@@ -203,7 +203,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
}
|
||||
|
||||
//Give them at least two packets, to play nice with some broken viewers (SL also behaves this way)
|
||||
if (m_stopPacket == 1 && Layers[0].End > FIRST_PACKET_SIZE) m_stopPacket++;
|
||||
if (m_stopPacket == 1 && m_layers[0].End > FIRST_PACKET_SIZE) m_stopPacket++;
|
||||
|
||||
m_currentPacket = StartPacket;
|
||||
}
|
||||
@@ -344,7 +344,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
|
||||
private void J2KDecodedCallback(UUID AssetId, OpenJPEG.J2KLayerInfo[] layers)
|
||||
{
|
||||
Layers = layers;
|
||||
m_layers = layers;
|
||||
IsDecoded = true;
|
||||
RunUpdate();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user