diff options
author | Teravus Ovares | 2008-04-24 11:32:41 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-04-24 11:32:41 +0000 |
commit | aa8aee90a35458f1f601ca23e2298b212782d0a3 (patch) | |
tree | 37c2645867cba040a4ad7e32d1b5ccd56d155d87 /OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |
parent | * From: Alan M Webb <awebb.vnet.ibm.com> (diff) | |
download | opensim-SC_OLD-aa8aee90a35458f1f601ca23e2298b212782d0a3.zip opensim-SC_OLD-aa8aee90a35458f1f601ca23e2298b212782d0a3.tar.gz opensim-SC_OLD-aa8aee90a35458f1f601ca23e2298b212782d0a3.tar.bz2 opensim-SC_OLD-aa8aee90a35458f1f601ca23e2298b212782d0a3.tar.xz |
* 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.
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/ODEPrim.cs')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 32 |
1 files changed, 22 insertions, 10 deletions
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 | |||
819 | if (m_taintparent.PhysicsActorType == (int)ActorTypes.Prim) | 819 | if (m_taintparent.PhysicsActorType == (int)ActorTypes.Prim) |
820 | { | 820 | { |
821 | OdePrim obj = (OdePrim)m_taintparent; | 821 | OdePrim obj = (OdePrim)m_taintparent; |
822 | if (obj.Body != (IntPtr)0 && Body != (IntPtr)0) | 822 | if (obj.Body != (IntPtr)0 && Body != (IntPtr)0 && obj.Body != Body) |
823 | { | 823 | { |
824 | _linkJointGroup = d.JointGroupCreate(0); | 824 | _linkJointGroup = d.JointGroupCreate(0); |
825 | m_linkJoint = d.JointCreateFixed(_parent_scene.world, _linkJointGroup); | 825 | m_linkJoint = d.JointCreateFixed(_parent_scene.world, _linkJointGroup); |
@@ -1098,7 +1098,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1098 | if (_parent != null) | 1098 | if (_parent != null) |
1099 | { | 1099 | { |
1100 | OdePrim odParent = (OdePrim)_parent; | 1100 | OdePrim odParent = (OdePrim)_parent; |
1101 | if (Body != (IntPtr)0 && odParent.Body != (IntPtr)0) | 1101 | if (Body != (IntPtr)0 && odParent.Body != (IntPtr)0 && Body != odParent.Body) |
1102 | { | 1102 | { |
1103 | m_linkJoint = d.JointCreateFixed(_parent_scene.world, _linkJointGroup); | 1103 | m_linkJoint = d.JointCreateFixed(_parent_scene.world, _linkJointGroup); |
1104 | d.JointAttach(m_linkJoint, Body, odParent.Body); | 1104 | d.JointAttach(m_linkJoint, Body, odParent.Body); |
@@ -1978,12 +1978,14 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1978 | { | 1978 | { |
1979 | _position = l_position; | 1979 | _position = l_position; |
1980 | //_parent_scene.remActivePrim(this); | 1980 | //_parent_scene.remActivePrim(this); |
1981 | base.RequestPhysicsterseUpdate(); | 1981 | if (_parent == null) |
1982 | base.RequestPhysicsterseUpdate(); | ||
1982 | return; | 1983 | return; |
1983 | } | 1984 | } |
1984 | else | 1985 | else |
1985 | { | 1986 | { |
1986 | base.RaiseOutOfBounds(l_position); | 1987 | if (_parent == null) |
1988 | base.RaiseOutOfBounds(l_position); | ||
1987 | return; | 1989 | return; |
1988 | } | 1990 | } |
1989 | } | 1991 | } |
@@ -1998,7 +2000,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1998 | 2000 | ||
1999 | 2001 | ||
2000 | //IsPhysical = false; | 2002 | //IsPhysical = false; |
2001 | base.RaiseOutOfBounds(_position); | 2003 | if (_parent == null) |
2004 | base.RaiseOutOfBounds(_position); | ||
2002 | 2005 | ||
2003 | _acceleration.X = 0; | 2006 | _acceleration.X = 0; |
2004 | _acceleration.Y = 0; | 2007 | _acceleration.Y = 0; |
@@ -2010,7 +2013,10 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2010 | m_rotationalVelocity.X = 0; | 2013 | m_rotationalVelocity.X = 0; |
2011 | m_rotationalVelocity.Y = 0; | 2014 | m_rotationalVelocity.Y = 0; |
2012 | m_rotationalVelocity.Z = 0; | 2015 | m_rotationalVelocity.Z = 0; |
2013 | base.RequestPhysicsterseUpdate(); | 2016 | |
2017 | if (_parent == null) | ||
2018 | base.RequestPhysicsterseUpdate(); | ||
2019 | |||
2014 | m_throttleUpdates = false; | 2020 | m_throttleUpdates = false; |
2015 | throttleCounter = 0; | 2021 | throttleCounter = 0; |
2016 | _zeroFlag = true; | 2022 | _zeroFlag = true; |
@@ -2054,14 +2060,20 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2054 | m_throttleUpdates = false; | 2060 | m_throttleUpdates = false; |
2055 | throttleCounter = 0; | 2061 | throttleCounter = 0; |
2056 | m_rotationalVelocity = pv; | 2062 | m_rotationalVelocity = pv; |
2057 | base.RequestPhysicsterseUpdate(); | 2063 | |
2064 | if (_parent == null) | ||
2065 | base.RequestPhysicsterseUpdate(); | ||
2066 | |||
2058 | m_lastUpdateSent = true; | 2067 | m_lastUpdateSent = true; |
2059 | } | 2068 | } |
2060 | } | 2069 | } |
2061 | else | 2070 | else |
2062 | { | 2071 | { |
2063 | if (lastZeroFlag != _zeroFlag) | 2072 | if (lastZeroFlag != _zeroFlag) |
2064 | base.RequestPhysicsterseUpdate(); | 2073 | { |
2074 | if (_parent == null) | ||
2075 | base.RequestPhysicsterseUpdate(); | ||
2076 | } | ||
2065 | 2077 | ||
2066 | m_lastVelocity = _velocity; | 2078 | m_lastVelocity = _velocity; |
2067 | 2079 | ||
@@ -2092,8 +2104,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2092 | m_lastUpdateSent = false; | 2104 | m_lastUpdateSent = false; |
2093 | if (!m_throttleUpdates || throttleCounter > 15) | 2105 | if (!m_throttleUpdates || throttleCounter > 15) |
2094 | { | 2106 | { |
2095 | 2107 | if (_parent == null) | |
2096 | base.RequestPhysicsterseUpdate(); | 2108 | base.RequestPhysicsterseUpdate(); |
2097 | } | 2109 | } |
2098 | else | 2110 | else |
2099 | { | 2111 | { |