diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 23 |
1 files changed, 6 insertions, 17 deletions
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 | |||
2021 | public Vector3 GetGeometricCenter() | 2021 | public Vector3 GetGeometricCenter() |
2022 | { | 2022 | { |
2023 | if (PhysActor != null) | 2023 | if (PhysActor != null) |
2024 | { | ||
2025 | return new Vector3(PhysActor.CenterOfMass.X, PhysActor.CenterOfMass.Y, PhysActor.CenterOfMass.Z); | 2024 | return new Vector3(PhysActor.CenterOfMass.X, PhysActor.CenterOfMass.Y, PhysActor.CenterOfMass.Z); |
2026 | } | ||
2027 | else | 2025 | else |
2028 | { | ||
2029 | return new Vector3(0, 0, 0); | 2026 | return new Vector3(0, 0, 0); |
2030 | } | ||
2031 | } | 2027 | } |
2032 | 2028 | ||
2033 | public float GetMass() | 2029 | public float GetMass() |
2034 | { | 2030 | { |
2035 | if (PhysActor != null) | 2031 | if (PhysActor != null) |
2036 | { | ||
2037 | return PhysActor.Mass; | 2032 | return PhysActor.Mass; |
2038 | } | ||
2039 | else | 2033 | else |
2040 | { | ||
2041 | return 0; | 2034 | return 0; |
2042 | } | ||
2043 | } | 2035 | } |
2044 | 2036 | ||
2045 | public Vector3 GetForce() | 2037 | public Vector3 GetForce() |
@@ -2055,15 +2047,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2055 | client.SendObjectPropertiesReply(this); | 2047 | client.SendObjectPropertiesReply(this); |
2056 | } | 2048 | } |
2057 | 2049 | ||
2058 | public UUID GetRootPartUUID() | ||
2059 | { | ||
2060 | return m_parentGroup.UUID; | ||
2061 | } | ||
2062 | |||
2063 | /// <summary> | 2050 | /// <summary> |
2064 | /// Method for a prim to get it's world position from the group. | 2051 | /// Method for a prim to get it's world position from the group. |
2065 | /// Remember, the Group Position simply gives the position of the group itself | ||
2066 | /// </summary> | 2052 | /// </summary> |
2053 | /// <remarks> | ||
2054 | /// Remember, the Group Position simply gives the position of the group itself | ||
2055 | /// </remarks> | ||
2067 | /// <returns>A Linked Child Prim objects position in world</returns> | 2056 | /// <returns>A Linked Child Prim objects position in world</returns> |
2068 | public Vector3 GetWorldPosition() | 2057 | public Vector3 GetWorldPosition() |
2069 | { | 2058 | { |
@@ -3117,7 +3106,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3117 | 3106 | ||
3118 | UUID ownerID = _ownerID; | 3107 | UUID ownerID = _ownerID; |
3119 | UUID objectID = ParentGroup.RootPart.UUID; | 3108 | UUID objectID = ParentGroup.RootPart.UUID; |
3120 | UUID parentID = GetRootPartUUID(); | 3109 | UUID parentID = ParentGroup.UUID; |
3121 | 3110 | ||
3122 | UUID soundID = UUID.Zero; | 3111 | UUID soundID = UUID.Zero; |
3123 | Vector3 position = AbsolutePosition; // region local | 3112 | Vector3 position = AbsolutePosition; // region local |
@@ -3156,7 +3145,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3156 | ParentGroup.PlaySoundMasterPrim = this; | 3145 | ParentGroup.PlaySoundMasterPrim = this; |
3157 | ownerID = _ownerID; | 3146 | ownerID = _ownerID; |
3158 | objectID = ParentGroup.RootPart.UUID; | 3147 | objectID = ParentGroup.RootPart.UUID; |
3159 | parentID = GetRootPartUUID(); | 3148 | parentID = ParentGroup.UUID; |
3160 | position = AbsolutePosition; // region local | 3149 | position = AbsolutePosition; // region local |
3161 | regionHandle = ParentGroup.Scene.RegionInfo.RegionHandle; | 3150 | regionHandle = ParentGroup.Scene.RegionInfo.RegionHandle; |
3162 | if (triggered) | 3151 | if (triggered) |
@@ -3167,7 +3156,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3167 | { | 3156 | { |
3168 | ownerID = prim._ownerID; | 3157 | ownerID = prim._ownerID; |
3169 | objectID = prim.ParentGroup.RootPart.UUID; | 3158 | objectID = prim.ParentGroup.RootPart.UUID; |
3170 | parentID = prim.GetRootPartUUID(); | 3159 | parentID = prim.ParentGroup.UUID; |
3171 | position = prim.AbsolutePosition; // region local | 3160 | position = prim.AbsolutePosition; // region local |
3172 | regionHandle = prim.ParentGroup.Scene.RegionInfo.RegionHandle; | 3161 | regionHandle = prim.ParentGroup.Scene.RegionInfo.RegionHandle; |
3173 | if (triggered) | 3162 | if (triggered) |