aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs')
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs39
1 files changed, 18 insertions, 21 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
index 8d5f269..6d322e2 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
@@ -101,7 +101,6 @@ namespace OpenSim.Region.Physics.OdePlugin
101 private float m_invTimeStep = 50.0f; 101 private float m_invTimeStep = 50.0f;
102 private float m_timeStep = .02f; 102 private float m_timeStep = .02f;
103 103
104
105 private Vector3 m_PIDTarget; 104 private Vector3 m_PIDTarget;
106 private float m_PIDTau; 105 private float m_PIDTau;
107 private bool m_usePID; 106 private bool m_usePID;
@@ -119,7 +118,7 @@ namespace OpenSim.Region.Physics.OdePlugin
119 private float m_buoyancy; //KF: m_buoyancy should be set by llSetBuoyancy() for non-vehicle. 118 private float m_buoyancy; //KF: m_buoyancy should be set by llSetBuoyancy() for non-vehicle.
120 119
121 private int body_autodisable_frames = 5; 120 private int body_autodisable_frames = 5;
122 private int bodydisablecontrol = 0; 121 public int bodydisablecontrol = 0;
123 122
124 123
125 // Default we're a Geometry 124 // Default we're a Geometry
@@ -144,7 +143,7 @@ namespace OpenSim.Region.Physics.OdePlugin
144 143
145 public bool m_disabled; 144 public bool m_disabled;
146 145
147 public uint m_localID; 146 private uint m_localID;
148 147
149 private IMesh m_mesh; 148 private IMesh m_mesh;
150 private object m_meshlock = new object(); 149 private object m_meshlock = new object();
@@ -167,7 +166,7 @@ namespace OpenSim.Region.Physics.OdePlugin
167// private bool m_throttleUpdates; 166// private bool m_throttleUpdates;
168// private int throttleCounter; 167// private int throttleCounter;
169 public float m_collisionscore; 168 public float m_collisionscore;
170 int m_colliderfilter = 0; 169 private int m_colliderfilter = 0;
171 170
172 public IntPtr collide_geom; // for objects: geom if single prim space it linkset 171 public IntPtr collide_geom; // for objects: geom if single prim space it linkset
173 172
@@ -235,7 +234,6 @@ namespace OpenSim.Region.Physics.OdePlugin
235 } 234 }
236 } 235 }
237 236
238
239 public override bool Phantom // this is not reliable for internal use 237 public override bool Phantom // this is not reliable for internal use
240 { 238 {
241 get { return m_fakeisphantom; } 239 get { return m_fakeisphantom; }
@@ -293,14 +291,18 @@ namespace OpenSim.Region.Physics.OdePlugin
293 291
294 public override uint LocalID 292 public override uint LocalID
295 { 293 {
294 get { return m_localID; }
295 set { m_localID = value; }
296 }
297
298 public OdePrim Parent
299 {
296 get 300 get
297 { 301 {
298 return m_localID; 302 if (childPrim)
299 } 303 return (OdePrim)_parent;
300 set 304 else
301 { 305 return this;
302 //m_log.Info("[PHYSICS]: Setting TrackerID: " + value);
303 m_localID = value;
304 } 306 }
305 } 307 }
306 308
@@ -945,8 +947,7 @@ namespace OpenSim.Region.Physics.OdePlugin
945 CollisionEventsThisFrame = null; 947 CollisionEventsThisFrame = null;
946 } 948 }
947 m_eventsubscription = 0; 949 m_eventsubscription = 0;
948 // for now still done on odescene 950 _parent_scene.RemoveCollisionEventReporting(this);
949// _parent_scene.RemoveCollisionEventReporting(this);
950 } 951 }
951 952
952 public void AddCollisionEvent(uint CollidedWith, ContactPoint contact) 953 public void AddCollisionEvent(uint CollidedWith, ContactPoint contact)
@@ -980,10 +981,6 @@ namespace OpenSim.Region.Physics.OdePlugin
980 } 981 }
981 else 982 else
982 { 983 {
983 if (ncolisions > 10)
984 {
985 }
986
987 SentEmptyCollisionsEvent = false; 984 SentEmptyCollisionsEvent = false;
988 CollisionEventsThisFrame.Clear(); 985 CollisionEventsThisFrame.Clear();
989 } 986 }
@@ -1832,8 +1829,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1832 { 1829 {
1833 d.BodySetAngularVel(Body, m_rotationalVelocity.X, m_rotationalVelocity.Y, m_rotationalVelocity.Z); 1830 d.BodySetAngularVel(Body, m_rotationalVelocity.X, m_rotationalVelocity.Y, m_rotationalVelocity.Z);
1834 d.BodySetLinearVel(Body, _velocity.X, _velocity.Y, _velocity.Z); 1831 d.BodySetLinearVel(Body, _velocity.X, _velocity.Y, _velocity.Z);
1835 } 1832 }
1836
1837 _parent_scene.addActiveGroups(this); 1833 _parent_scene.addActiveGroups(this);
1838 } 1834 }
1839 1835
@@ -3700,6 +3696,8 @@ namespace OpenSim.Region.Physics.OdePlugin
3700 d.BodySetAngularVel(Body, 0, 0, 0); 3696 d.BodySetAngularVel(Body, 0, 0, 0);
3701 d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); 3697 d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z);
3702 disableBodySoft(); // stop collisions 3698 disableBodySoft(); // stop collisions
3699 UnSubscribeEvents();
3700
3703 base.RequestPhysicsterseUpdate(); 3701 base.RequestPhysicsterseUpdate();
3704 return; 3702 return;
3705 } 3703 }
@@ -3871,8 +3869,7 @@ namespace OpenSim.Region.Physics.OdePlugin
3871 m_vehicle = null; 3869 m_vehicle = null;
3872 RemoveGeom(); 3870 RemoveGeom();
3873 m_targetSpace = IntPtr.Zero; 3871 m_targetSpace = IntPtr.Zero;
3874 if (m_eventsubscription > 0) 3872 UnSubscribeEvents();
3875 UnSubscribeEvents();
3876 return true; 3873 return true;
3877 3874
3878 case changes.Link: 3875 case changes.Link: