From a47328973866d0cdd4503f1bcfa5da6183f0f0b0 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Sat, 17 Nov 2007 08:14:17 +0000 Subject: minor cleanup of some dodgy bits --- .../Region/Environment/Scenes/Scene.Inventory.cs | 37 ++++++++-------------- .../Region/Environment/Scenes/SceneObjectPart.cs | 11 +------ 2 files changed, 15 insertions(+), 33 deletions(-) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index f840845..c811966 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -283,6 +283,13 @@ namespace OpenSim.Region.Environment.Scenes isTexture = true; } AssetBase rezAsset = AssetCache.GetAsset(item.assetID, isTexture); + + if (rezAsset == null) + { + // lets try once more in case the asset cache is being slow getting the asset from server + rezAsset = AssetCache.GetAsset(item.assetID, isTexture); + } + if (rezAsset != null) { string script = Util.FieldToString(rezAsset.Data); @@ -290,18 +297,6 @@ namespace OpenSim.Region.Environment.Scenes EventManager.TriggerRezScript(localID, copyID, script); rezzed = true; } - else - { - //lets try once more incase the asset cache is being slow getting the asset from server - rezAsset = AssetCache.GetAsset(item.assetID, isTexture); - if (rezAsset != null) - { - string script = Util.FieldToString(rezAsset.Data); - // Console.WriteLine("rez script " + script); - EventManager.TriggerRezScript(localID, copyID, script); - rezzed = true; - } - } if (rezzed) { @@ -418,23 +413,19 @@ namespace OpenSim.Region.Environment.Scenes if (item != null) { AssetBase rezAsset = AssetCache.GetAsset(item.assetID, false); + + if (rezAsset == null) + { + // lets try once more in case the asset cache is being slow getting the asset from server + rezAsset = AssetCache.GetAsset(item.assetID, false); + } + if (rezAsset != null) { AddRezObject(Util.FieldToString(rezAsset.Data), pos); userInfo.DeleteItem(remoteClient.AgentId, item); remoteClient.SendRemoveInventoryItem(itemID); } - else - { - //lets try once more incase the asset cache is being slow getting the asset from server - rezAsset = AssetCache.GetAsset(item.assetID, false); - if (rezAsset != null) - { - AddRezObject(Util.FieldToString(rezAsset.Data), pos); - userInfo.DeleteItem(remoteClient.AgentId, item); - remoteClient.SendRemoveInventoryItem(itemID); - } - } } } } diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 61cc973..b2e585d 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -62,7 +62,6 @@ namespace OpenSim.Region.Environment.Scenes public Int32 CreationDate; public uint ParentID = 0; - public uint OwnerMask = FULL_MASK_PERMISSIONS; public uint NextOwnerMask = FULL_MASK_PERMISSIONS; public uint GroupMask = FULL_MASK_PERMISSIONS; @@ -913,7 +912,7 @@ namespace OpenSim.Region.Environment.Scenes /// that's not wholesome. Had to make m_scene public PhysActor = null; - if (!((ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) != 0)) + if ((ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0) { PhysActor = m_parentGroup.m_scene.PhysScene.AddPrimShape( Name, @@ -929,15 +928,7 @@ namespace OpenSim.Region.Environment.Scenes PhysActor.OnOutOfBounds += PhysicsOutOfBounds; } } - - - } - - - - - } public void UpdateExtraParam(ushort type, bool inUse, byte[] data) -- cgit v1.1