From a47328973866d0cdd4503f1bcfa5da6183f0f0b0 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Sat, 17 Nov 2007 08:14:17 +0000 Subject: [PATCH] minor cleanup of some dodgy bits --- OpenSim/Framework/ConfigurationMember.cs | 2 +- .../Environment/Scenes/Scene.Inventory.cs | 37 +++++++------------ .../Environment/Scenes/SceneObjectPart.cs | 11 +----- 3 files changed, 16 insertions(+), 34 deletions(-) diff --git a/OpenSim/Framework/ConfigurationMember.cs b/OpenSim/Framework/ConfigurationMember.cs index 8e46a04223..15008ae595 100644 --- a/OpenSim/Framework/ConfigurationMember.cs +++ b/OpenSim/Framework/ConfigurationMember.cs @@ -199,7 +199,7 @@ namespace OpenSim.Framework { string console_result = ""; string attribute = null; - if (useFile || (!useFile && configurationFromXMLNode != null)) + if (useFile || configurationFromXMLNode != null) { if (!ignoreNextFromConfig) { diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index f840845a0d..c811966dbd 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 61cc97349d..b2e585d506 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)