From 6d4432f44009d7f7f3e52c56e8ccc994494ec529 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 24 Aug 2011 22:34:26 +0100 Subject: [PATCH] refactor: simplify EntityBase.IsDeleted property --- OpenSim/Region/Framework/Scenes/EntityBase.cs | 7 +------ OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 6 +++--- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/EntityBase.cs b/OpenSim/Region/Framework/Scenes/EntityBase.cs index 6fd38e56b1..213431a7df 100644 --- a/OpenSim/Region/Framework/Scenes/EntityBase.cs +++ b/OpenSim/Region/Framework/Scenes/EntityBase.cs @@ -66,12 +66,7 @@ namespace OpenSim.Region.Framework.Scenes /// /// Signals whether this entity was in a scene but has since been removed from it. /// - public bool IsDeleted - { - get { return m_isDeleted; } - set { m_isDeleted = value; } - } - protected bool m_isDeleted; + public bool IsDeleted { get; protected internal set; } protected Vector3 m_pos; diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 079148f5ee..8f0fa556aa 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1832,7 +1832,7 @@ namespace OpenSim.Region.Framework.Scenes // an object has been deleted from a scene before update was processed. // A more fundamental overhaul of the update mechanism is required to eliminate all // the race conditions. - if (m_isDeleted) + if (IsDeleted) return; // Even temporary objects take part in physics (e.g. temp-on-rez bullets) @@ -2142,7 +2142,7 @@ namespace OpenSim.Region.Framework.Scenes } m_scene.UnlinkSceneObject(objectGroup, true); - objectGroup.m_isDeleted = true; + objectGroup.IsDeleted = true; objectGroup.m_parts.Clear(); @@ -3385,7 +3385,7 @@ namespace OpenSim.Region.Framework.Scenes public virtual ISceneObject CloneForNewScene() { SceneObjectGroup sog = Copy(false); - sog.m_isDeleted = false; + sog.IsDeleted = false; return sog; } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 951816160c..def4ecbd31 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3809,7 +3809,7 @@ namespace OpenSim.Region.Framework.Scenes List attachments = m_appearance.GetAttachments(); foreach (AvatarAttachment attach in attachments) { - if (m_isDeleted) + if (IsDeleted) return; int p = attach.AttachPoint;