Merge branch 'master' of /team/src/opensim
commit
08637727dc
|
@ -247,6 +247,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
if (m_asset == null)
|
if (m_asset == null)
|
||||||
{
|
{
|
||||||
|
m_log.Warn("[J2KIMAGE]: Sending ImageNotInDatabase for texture " + TextureID);
|
||||||
client.SendImageNotFound(TextureID);
|
client.SendImageNotFound(TextureID);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -383,10 +384,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
HasAsset = true;
|
HasAsset = true;
|
||||||
|
|
||||||
if (asset == null || asset.Data == null)
|
if (asset == null || asset.Data == null)
|
||||||
|
{
|
||||||
|
if (m_imageManager.MissingImage != null)
|
||||||
|
{
|
||||||
|
m_asset = m_imageManager.MissingImage.Data;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
m_asset = null;
|
m_asset = null;
|
||||||
IsDecoded = true;
|
IsDecoded = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_asset = asset.Data;
|
m_asset = asset.Data;
|
||||||
|
|
|
@ -54,6 +54,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
private bool m_shuttingdown;
|
private bool m_shuttingdown;
|
||||||
|
private AssetBase m_missingImage;
|
||||||
private IAssetService m_assetCache;
|
private IAssetService m_assetCache;
|
||||||
private IJ2KDecoder m_j2kDecodeModule;
|
private IJ2KDecoder m_j2kDecodeModule;
|
||||||
|
|
||||||
|
@ -72,11 +73,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IClientAPI Client { get; private set; }
|
public IClientAPI Client { get; private set; }
|
||||||
|
|
||||||
|
public AssetBase MissingImage { get { return m_missingImage; } }
|
||||||
|
|
||||||
public LLImageManager(IClientAPI client, IAssetService pAssetCache, IJ2KDecoder pJ2kDecodeModule)
|
public LLImageManager(IClientAPI client, IAssetService pAssetCache, IJ2KDecoder pJ2kDecodeModule)
|
||||||
{
|
{
|
||||||
Client = client;
|
Client = client;
|
||||||
m_assetCache = pAssetCache;
|
m_assetCache = pAssetCache;
|
||||||
|
|
||||||
|
if (pAssetCache != null)
|
||||||
|
m_missingImage = pAssetCache.Get("5748decc-f629-461c-9a36-a35a221fe21f");
|
||||||
|
|
||||||
|
if (m_missingImage == null)
|
||||||
|
m_log.Error("[ClientView] - Couldn't set missing image asset, falling back to missing image packet. This is known to crash the client");
|
||||||
|
|
||||||
m_j2kDecodeModule = pJ2kDecodeModule;
|
m_j2kDecodeModule = pJ2kDecodeModule;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue