From aa8aee90a35458f1f601ca23e2298b212782d0a3 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Thu, 24 Apr 2008 11:32:41 +0000 Subject: * Adds much better support for attachments that you right click on in world. * Your friends can see your attachments now. People who appear in the sim after you've attached something can also see your attachments. * You can position & rotate your attachments now. Positions do *not* save. * You can detach attachments now the regular way. * Attachments do not cross into other regions with you..(this isn't too far off) * Updated ODE to not request terse updates on child prim. --- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 32 ++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region/Physics/OdePlugin/ODEPrim.cs') diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 7a9734c..947466f 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -819,7 +819,7 @@ namespace OpenSim.Region.Physics.OdePlugin if (m_taintparent.PhysicsActorType == (int)ActorTypes.Prim) { OdePrim obj = (OdePrim)m_taintparent; - if (obj.Body != (IntPtr)0 && Body != (IntPtr)0) + if (obj.Body != (IntPtr)0 && Body != (IntPtr)0 && obj.Body != Body) { _linkJointGroup = d.JointGroupCreate(0); m_linkJoint = d.JointCreateFixed(_parent_scene.world, _linkJointGroup); @@ -1098,7 +1098,7 @@ namespace OpenSim.Region.Physics.OdePlugin if (_parent != null) { OdePrim odParent = (OdePrim)_parent; - if (Body != (IntPtr)0 && odParent.Body != (IntPtr)0) + if (Body != (IntPtr)0 && odParent.Body != (IntPtr)0 && Body != odParent.Body) { m_linkJoint = d.JointCreateFixed(_parent_scene.world, _linkJointGroup); d.JointAttach(m_linkJoint, Body, odParent.Body); @@ -1978,12 +1978,14 @@ namespace OpenSim.Region.Physics.OdePlugin { _position = l_position; //_parent_scene.remActivePrim(this); - base.RequestPhysicsterseUpdate(); + if (_parent == null) + base.RequestPhysicsterseUpdate(); return; } else { - base.RaiseOutOfBounds(l_position); + if (_parent == null) + base.RaiseOutOfBounds(l_position); return; } } @@ -1998,7 +2000,8 @@ namespace OpenSim.Region.Physics.OdePlugin //IsPhysical = false; - base.RaiseOutOfBounds(_position); + if (_parent == null) + base.RaiseOutOfBounds(_position); _acceleration.X = 0; _acceleration.Y = 0; @@ -2010,7 +2013,10 @@ namespace OpenSim.Region.Physics.OdePlugin m_rotationalVelocity.X = 0; m_rotationalVelocity.Y = 0; m_rotationalVelocity.Z = 0; - base.RequestPhysicsterseUpdate(); + + if (_parent == null) + base.RequestPhysicsterseUpdate(); + m_throttleUpdates = false; throttleCounter = 0; _zeroFlag = true; @@ -2054,14 +2060,20 @@ namespace OpenSim.Region.Physics.OdePlugin m_throttleUpdates = false; throttleCounter = 0; m_rotationalVelocity = pv; - base.RequestPhysicsterseUpdate(); + + if (_parent == null) + base.RequestPhysicsterseUpdate(); + m_lastUpdateSent = true; } } else { if (lastZeroFlag != _zeroFlag) - base.RequestPhysicsterseUpdate(); + { + if (_parent == null) + base.RequestPhysicsterseUpdate(); + } m_lastVelocity = _velocity; @@ -2092,8 +2104,8 @@ namespace OpenSim.Region.Physics.OdePlugin m_lastUpdateSent = false; if (!m_throttleUpdates || throttleCounter > 15) { - - base.RequestPhysicsterseUpdate(); + if (_parent == null) + base.RequestPhysicsterseUpdate(); } else { -- cgit v1.1