refactor: simplify EntityBase.IsDeleted property

bulletsim
Justin Clark-Casey (justincc) 2011-08-24 22:34:26 +01:00
parent 21f1b68fdf
commit 6d4432f440
3 changed files with 5 additions and 10 deletions

View File

@ -66,12 +66,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <summary>
/// Signals whether this entity was in a scene but has since been removed from it.
/// </summary>
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;

View File

@ -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;
}

View File

@ -3809,7 +3809,7 @@ namespace OpenSim.Region.Framework.Scenes
List<AvatarAttachment> attachments = m_appearance.GetAttachments();
foreach (AvatarAttachment attach in attachments)
{
if (m_isDeleted)
if (IsDeleted)
return;
int p = attach.AttachPoint;