From 10d883dc88d5d2170930ba9353eadbfa7f3e6bc7 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 1 Sep 2011 01:41:53 +0100 Subject: refactor: use ParentGroup.UUID directly instead of SOP.GetRootPartUUID() --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 23 ++++++---------------- 1 file changed, 6 insertions(+), 17 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 982c492..68b24cd 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -2021,25 +2021,17 @@ namespace OpenSim.Region.Framework.Scenes public Vector3 GetGeometricCenter() { if (PhysActor != null) - { return new Vector3(PhysActor.CenterOfMass.X, PhysActor.CenterOfMass.Y, PhysActor.CenterOfMass.Z); - } else - { return new Vector3(0, 0, 0); - } } public float GetMass() { if (PhysActor != null) - { return PhysActor.Mass; - } else - { return 0; - } } public Vector3 GetForce() @@ -2055,15 +2047,12 @@ namespace OpenSim.Region.Framework.Scenes client.SendObjectPropertiesReply(this); } - public UUID GetRootPartUUID() - { - return m_parentGroup.UUID; - } - /// /// Method for a prim to get it's world position from the group. - /// Remember, the Group Position simply gives the position of the group itself /// + /// + /// Remember, the Group Position simply gives the position of the group itself + /// /// A Linked Child Prim objects position in world public Vector3 GetWorldPosition() { @@ -3117,7 +3106,7 @@ namespace OpenSim.Region.Framework.Scenes UUID ownerID = _ownerID; UUID objectID = ParentGroup.RootPart.UUID; - UUID parentID = GetRootPartUUID(); + UUID parentID = ParentGroup.UUID; UUID soundID = UUID.Zero; Vector3 position = AbsolutePosition; // region local @@ -3156,7 +3145,7 @@ namespace OpenSim.Region.Framework.Scenes ParentGroup.PlaySoundMasterPrim = this; ownerID = _ownerID; objectID = ParentGroup.RootPart.UUID; - parentID = GetRootPartUUID(); + parentID = ParentGroup.UUID; position = AbsolutePosition; // region local regionHandle = ParentGroup.Scene.RegionInfo.RegionHandle; if (triggered) @@ -3167,7 +3156,7 @@ namespace OpenSim.Region.Framework.Scenes { ownerID = prim._ownerID; objectID = prim.ParentGroup.RootPart.UUID; - parentID = prim.GetRootPartUUID(); + parentID = prim.ParentGroup.UUID; position = prim.AbsolutePosition; // region local regionHandle = prim.ParentGroup.Scene.RegionInfo.RegionHandle; if (triggered) -- cgit v1.1