From 2a1c11fda9b4ab948b7821ef2423270793a5e577 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 10 Aug 2010 20:15:44 +0100 Subject: On shift-copy of an object, set up a new physics actor (as appropriate) for every copied prim, not just the root This addresses http://opensimulator.org/mantis/view.php?id=4295 --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 0d3f64c..cf718cb 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -150,8 +150,17 @@ namespace OpenSim.Region.Framework.Scenes // TODO: This needs to be persisted in next XML version update! [XmlIgnore] public readonly int[] PayPrice = {-2,-2,-2,-2,-2}; + [XmlIgnore] - public PhysicsActor PhysActor; + public PhysicsActor PhysActor + { + get { return m_physActor; } + set + { +// m_log.DebugFormat("[SOP]: PhysActor set to {0} for {1} {2}", value, Name, UUID); + m_physActor = value; + } + } //Xantor 20080528 Sound stuff: // Note: This isn't persisted in the database right now, as the fields for that aren't just there yet. @@ -297,6 +306,7 @@ namespace OpenSim.Region.Framework.Scenes /// private byte m_updateFlag; + private PhysicsActor m_physActor; protected Vector3 m_acceleration; protected Vector3 m_angularVelocity; @@ -1006,7 +1016,11 @@ namespace OpenSim.Region.Framework.Scenes public bool CreateSelected { get { return m_createSelected; } - set { m_createSelected = value; } + set + { +// m_log.DebugFormat("[SOP]: Setting CreateSelected to {0} for {1} {2}", value, Name, UUID); + m_createSelected = value; + } } #endregion @@ -1531,7 +1545,7 @@ namespace OpenSim.Region.Framework.Scenes } else { - m_log.DebugFormat("[SPEW]: physics actor is null for {0} with parent {1}", UUID, this.ParentGroup.UUID); + m_log.DebugFormat("[SOP]: physics actor is null for {0} with parent {1}", UUID, this.ParentGroup.UUID); } } } @@ -1801,7 +1815,7 @@ namespace OpenSim.Region.Framework.Scenes /// that's not wholesome. Had to make Scene public //PhysActor = null; - if ((ObjectFlags & (uint)PrimFlags.Phantom) == 0) + if ((Flags & PrimFlags.Phantom) == 0) { if (UsePhysics) { -- cgit v1.1