aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs
diff options
context:
space:
mode:
authorDiva Canto2009-10-12 17:00:01 -0700
committerDiva Canto2009-10-12 17:00:01 -0700
commitc0beeb929e22509329781cdf85f7a5d90c4b0e36 (patch)
tree42f724d921f08b0d2d14c8f7eb872a118a9adadd /OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs
parent0004246: [Patch] FlotsamAssetCache deep scan & cache (diff)
downloadopensim-SC_OLD-c0beeb929e22509329781cdf85f7a5d90c4b0e36.zip
opensim-SC_OLD-c0beeb929e22509329781cdf85f7a5d90c4b0e36.tar.gz
opensim-SC_OLD-c0beeb929e22509329781cdf85f7a5d90c4b0e36.tar.bz2
opensim-SC_OLD-c0beeb929e22509329781cdf85f7a5d90c4b0e36.tar.xz
* Fixes http://opensimulator.org/mantis/view.php?id=4225
* Fixes http://opensimulator.org/mantis/view.php?id=3959 * Allows for viewing inventory textures outside home grid
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs b/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs
index 5877779..1bbe00f 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs
@@ -31,6 +31,7 @@ using OpenMetaverse;
31using OpenMetaverse.Imaging; 31using OpenMetaverse.Imaging;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.Framework.Interfaces; 33using OpenSim.Region.Framework.Interfaces;
34using OpenSim.Region.Framework.Scenes.Hypergrid;
34using OpenSim.Services.Interfaces; 35using OpenSim.Services.Interfaces;
35using log4net; 36using log4net;
36using System.Reflection; 37using System.Reflection;
@@ -54,6 +55,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
54 public UUID TextureID; 55 public UUID TextureID;
55 public IJ2KDecoder J2KDecoder; 56 public IJ2KDecoder J2KDecoder;
56 public IAssetService AssetService; 57 public IAssetService AssetService;
58 public UUID AgentID;
59 public IHyperAssetService HyperAssets;
57 public OpenJPEG.J2KLayerInfo[] Layers; 60 public OpenJPEG.J2KLayerInfo[] Layers;
58 public bool IsDecoded; 61 public bool IsDecoded;
59 public bool HasAsset; 62 public bool HasAsset;
@@ -370,6 +373,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
370 UUID assetID = UUID.Zero; 373 UUID assetID = UUID.Zero;
371 if (asset != null) 374 if (asset != null)
372 assetID = asset.FullID; 375 assetID = asset.FullID;
376 else if (HyperAssets != null)
377 {
378 // Try the user's inventory, but only if it's different from the regions'
379 string userAssets = HyperAssets.GetUserAssetServer(AgentID);
380 if ((userAssets != string.Empty) && (userAssets != HyperAssets.GetSimAssetServer()))
381 {
382 m_log.DebugFormat("[J2KIMAGE]: texture {0} not found in local asset storage. Trying user's storage.", id);
383 AssetService.Get(userAssets + "/" + id, this, AssetReceived);
384 return;
385 }
386 }
373 387
374 AssetDataCallback(assetID, asset); 388 AssetDataCallback(assetID, asset);
375 389