mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Heart surgery on asset service code bits. Affects OpenSim.ini configuration -- please see the example. Affects region servers only.
This may break a lot of things, but it needs to go in. It was tested in standalone and the UCI grid, but it needs a lot more testing. Known problems: * HG asset transfers are borked for now * missing texture is missing * 3 unit tests commented out for now
This commit is contained in:
@@ -31,6 +31,7 @@ using OpenMetaverse;
|
||||
using OpenMetaverse.Imaging;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using log4net;
|
||||
using System.Reflection;
|
||||
|
||||
@@ -50,7 +51,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
public sbyte m_requestedDiscardLevel;
|
||||
public UUID m_requestedUUID;
|
||||
public IJ2KDecoder m_j2kDecodeModule;
|
||||
public IAssetCache m_assetCache;
|
||||
public IAssetService m_assetCache;
|
||||
public OpenJPEG.J2KLayerInfo[] Layers = new OpenJPEG.J2KLayerInfo[0];
|
||||
public AssetBase m_MissingSubstitute = null;
|
||||
public bool m_decoded = false;
|
||||
@@ -131,6 +132,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
RunUpdate();
|
||||
}
|
||||
|
||||
protected void AssetReceived(string id, Object sender, AssetBase asset)
|
||||
{
|
||||
if (asset != null)
|
||||
AssetDataCallback(asset.FullID, asset);
|
||||
}
|
||||
|
||||
private int GetPacketForBytePosition(int bytePosition)
|
||||
{
|
||||
return ((bytePosition - cFirstPacketSize + cImagePacketSize - 1) / cImagePacketSize) + 1;
|
||||
@@ -301,7 +308,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
if (!m_asset_requested)
|
||||
{
|
||||
m_asset_requested = true;
|
||||
m_assetCache.GetAsset(m_requestedUUID, AssetDataCallback, true);
|
||||
m_assetCache.Get(m_requestedUUID.ToString(), this, AssetReceived);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user