Merge commit 'c93c9ea072f319125f466c913f5f4fe1f6864045' into bigmerge

avinationmerge
Melanie 2011-10-25 01:52:54 +01:00
commit e43e1b49db
3 changed files with 19 additions and 11 deletions

View File

@ -536,10 +536,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
so.AttachedAvatar = sp.UUID; so.AttachedAvatar = sp.UUID;
if (so.RootPart.PhysActor != null) if (so.RootPart.PhysActor != null)
{ so.RootPart.RemoveFromPhysics();
m_scene.PhysicsScene.RemovePrim(so.RootPart.PhysActor);
so.RootPart.PhysActor = null;
}
so.AbsolutePosition = attachOffset; so.AbsolutePosition = attachOffset;
so.RootPart.AttachedPos = attachOffset; so.RootPart.AttachedPos = attachOffset;

View File

@ -2094,8 +2094,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
else if (part.PhysActor != null) else if (part.PhysActor != null)
{ {
PhysicsScene.RemovePrim(part.PhysActor); part.RemoveFromPhysics();
part.PhysActor = null;
} }
} }

View File

@ -1641,6 +1641,7 @@ namespace OpenSim.Region.Framework.Scenes
m_log.ErrorFormat("[SCENE]: caught exception meshing object {0}. Object set to phantom.", m_uuid); m_log.ErrorFormat("[SCENE]: caught exception meshing object {0}. Object set to phantom.", m_uuid);
PhysActor = null; PhysActor = null;
} }
// Basic Physics returns null.. joy joy joy. // Basic Physics returns null.. joy joy joy.
if (PhysActor != null) if (PhysActor != null)
{ {
@ -4454,12 +4455,9 @@ namespace OpenSim.Region.Framework.Scenes
|| (Shape.PathCurve == (byte)Extrusion.Flexible)) // note: this may have been changed above in the case of joints || (Shape.PathCurve == (byte)Extrusion.Flexible)) // note: this may have been changed above in the case of joints
{ {
AddFlag(PrimFlags.Phantom); AddFlag(PrimFlags.Phantom);
if (PhysActor != null) if (PhysActor != null)
{ RemoveFromPhysics();
m_parentGroup.Scene.PhysicsScene.RemovePrim(PhysActor);
/// that's not wholesome. Had to make Scene public
PhysActor = null;
}
} }
else // Not phantom else // Not phantom
{ {
@ -4573,6 +4571,20 @@ namespace OpenSim.Region.Framework.Scenes
// m_log.DebugFormat("[SCENE OBJECT PART]: Updated PrimFlags on {0} {1} to {2}", Name, LocalId, Flags); // m_log.DebugFormat("[SCENE OBJECT PART]: Updated PrimFlags on {0} {1} to {2}", Name, LocalId, Flags);
} }
/// <summary>
/// This removes the part from physics
/// </summary>
/// <remarks>
/// This isn't the same as turning off physical, since even without being physical the prim has a physics
/// representation for collision detection. Rather, this would be used in situations such as making a prim
/// phantom.
/// </remarks>
public void RemoveFromPhysics()
{
ParentGroup.Scene.PhysicsScene.RemovePrim(PhysActor);
PhysActor = null;
}
public void UpdateRotation(Quaternion rot) public void UpdateRotation(Quaternion rot)
{ {
if ((rot.X != RotationOffset.X) || if ((rot.X != RotationOffset.X) ||