refactor: use ParentGroup.UUID directly instead of SOP.GetRootPartUUID()
parent
63bf710237
commit
10d883dc88
|
@ -2021,25 +2021,17 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public Vector3 GetGeometricCenter()
|
public Vector3 GetGeometricCenter()
|
||||||
{
|
{
|
||||||
if (PhysActor != null)
|
if (PhysActor != null)
|
||||||
{
|
|
||||||
return new Vector3(PhysActor.CenterOfMass.X, PhysActor.CenterOfMass.Y, PhysActor.CenterOfMass.Z);
|
return new Vector3(PhysActor.CenterOfMass.X, PhysActor.CenterOfMass.Y, PhysActor.CenterOfMass.Z);
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
return new Vector3(0, 0, 0);
|
return new Vector3(0, 0, 0);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public float GetMass()
|
public float GetMass()
|
||||||
{
|
{
|
||||||
if (PhysActor != null)
|
if (PhysActor != null)
|
||||||
{
|
|
||||||
return PhysActor.Mass;
|
return PhysActor.Mass;
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Vector3 GetForce()
|
public Vector3 GetForce()
|
||||||
|
@ -2055,15 +2047,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
client.SendObjectPropertiesReply(this);
|
client.SendObjectPropertiesReply(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public UUID GetRootPartUUID()
|
|
||||||
{
|
|
||||||
return m_parentGroup.UUID;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Method for a prim to get it's world position from the group.
|
/// 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
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Remember, the Group Position simply gives the position of the group itself
|
||||||
|
/// </remarks>
|
||||||
/// <returns>A Linked Child Prim objects position in world</returns>
|
/// <returns>A Linked Child Prim objects position in world</returns>
|
||||||
public Vector3 GetWorldPosition()
|
public Vector3 GetWorldPosition()
|
||||||
{
|
{
|
||||||
|
@ -3117,7 +3106,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
UUID ownerID = _ownerID;
|
UUID ownerID = _ownerID;
|
||||||
UUID objectID = ParentGroup.RootPart.UUID;
|
UUID objectID = ParentGroup.RootPart.UUID;
|
||||||
UUID parentID = GetRootPartUUID();
|
UUID parentID = ParentGroup.UUID;
|
||||||
|
|
||||||
UUID soundID = UUID.Zero;
|
UUID soundID = UUID.Zero;
|
||||||
Vector3 position = AbsolutePosition; // region local
|
Vector3 position = AbsolutePosition; // region local
|
||||||
|
@ -3156,7 +3145,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
ParentGroup.PlaySoundMasterPrim = this;
|
ParentGroup.PlaySoundMasterPrim = this;
|
||||||
ownerID = _ownerID;
|
ownerID = _ownerID;
|
||||||
objectID = ParentGroup.RootPart.UUID;
|
objectID = ParentGroup.RootPart.UUID;
|
||||||
parentID = GetRootPartUUID();
|
parentID = ParentGroup.UUID;
|
||||||
position = AbsolutePosition; // region local
|
position = AbsolutePosition; // region local
|
||||||
regionHandle = ParentGroup.Scene.RegionInfo.RegionHandle;
|
regionHandle = ParentGroup.Scene.RegionInfo.RegionHandle;
|
||||||
if (triggered)
|
if (triggered)
|
||||||
|
@ -3167,7 +3156,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
ownerID = prim._ownerID;
|
ownerID = prim._ownerID;
|
||||||
objectID = prim.ParentGroup.RootPart.UUID;
|
objectID = prim.ParentGroup.RootPart.UUID;
|
||||||
parentID = prim.GetRootPartUUID();
|
parentID = prim.ParentGroup.UUID;
|
||||||
position = prim.AbsolutePosition; // region local
|
position = prim.AbsolutePosition; // region local
|
||||||
regionHandle = prim.ParentGroup.Scene.RegionInfo.RegionHandle;
|
regionHandle = prim.ParentGroup.Scene.RegionInfo.RegionHandle;
|
||||||
if (triggered)
|
if (triggered)
|
||||||
|
|
Loading…
Reference in New Issue