minor refactor
parent
e52c217e44
commit
ed0f8bd572
|
@ -98,7 +98,12 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
}
|
||||
}
|
||||
|
||||
public AssetBase GetAsset(LLUUID assetID)
|
||||
/// <summary>
|
||||
/// Only get an asset if we already have it in the cache.
|
||||
/// </summary>
|
||||
/// <param name="assetID"></param></param>
|
||||
/// <returns></returns>
|
||||
private AssetBase GetCachedAsset(LLUUID assetID)
|
||||
{
|
||||
AssetBase asset = null;
|
||||
if (Textures.ContainsKey(assetID))
|
||||
|
@ -153,7 +158,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
|
||||
public AssetBase GetAsset(LLUUID assetID, bool isTexture)
|
||||
{
|
||||
AssetBase asset = GetAsset(assetID);
|
||||
AssetBase asset = GetCachedAsset(assetID);
|
||||
if (asset == null)
|
||||
{
|
||||
m_assetServer.RequestAsset(assetID, isTexture);
|
||||
|
@ -223,7 +228,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
|
||||
public AssetBase CopyAsset(LLUUID assetID)
|
||||
{
|
||||
AssetBase asset = GetAsset(assetID);
|
||||
AssetBase asset = GetCachedAsset(assetID);
|
||||
if (asset == null)
|
||||
return null;
|
||||
|
||||
|
|
|
@ -3106,7 +3106,7 @@ namespace OpenSim.Region.ClientStack
|
|||
|
||||
// Fetch landmark
|
||||
LLUUID lmid = tpReq.Info.LandmarkID;
|
||||
AssetBase lma = m_assetCache.GetAsset(lmid);
|
||||
AssetBase lma = m_assetCache.GetAsset(lmid, false);
|
||||
if (lma != null)
|
||||
{
|
||||
AssetLandmark lm = new AssetLandmark(lma);
|
||||
|
|
|
@ -146,7 +146,9 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
if (transactions != null)
|
||||
{
|
||||
LLUUID assetID = libsecondlife.LLUUID.Combine(transactionID, remoteClient.SecureSessionId);
|
||||
AssetBase asset = AssetCache.GetAsset(assetID);
|
||||
AssetBase asset
|
||||
= AssetCache.GetAsset(
|
||||
assetID, (item.assetType == (int)AssetType.Texture ? true : false));
|
||||
|
||||
if (asset == null)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue