aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs13
-rw-r--r--OpenSim/Region/Physics/Meshing/Extruder.cs12
-rw-r--r--OpenSim/Region/Physics/Meshing/HelperTypes.cs3
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs98
-rw-r--r--OpenSim/Region/Physics/Meshing/SculptMesh.cs2
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs17
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs10
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs16
8 files changed, 89 insertions, 82 deletions
diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs
index 1fa759c..144ad53 100644
--- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs
+++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs
@@ -319,7 +319,10 @@ namespace OpenSim.Region.Physics.BulletXPlugin
319 { 319 {
320 int[] indexBase; 320 int[] indexBase;
321 Vector3[] vertexBase; 321 Vector3[] vertexBase;
322 Vector3 vNormal, vP1, vP2, vP3; 322 Vector3 vNormal;
323 // Vector3 vP1;
324 // Vector3 vP2;
325 // Vector3 vP3;
323 IMesh mesh = primB.GetMesh(); 326 IMesh mesh = primB.GetMesh();
324 327
325 float fdistance; 328 float fdistance;
@@ -484,7 +487,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin
484 internal Dictionary<RigidBody, BulletXPrim> _prims = new Dictionary<RigidBody, BulletXPrim>(); 487 internal Dictionary<RigidBody, BulletXPrim> _prims = new Dictionary<RigidBody, BulletXPrim>();
485 488
486 public IMesher mesher; 489 public IMesher mesher;
487 private IConfigSource m_config; 490 // private IConfigSource m_config;
488 491
489 492
490 public static float Gravity 493 public static float Gravity
@@ -541,7 +544,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin
541 public override void Initialise(IMesher meshmerizer, IConfigSource config) 544 public override void Initialise(IMesher meshmerizer, IConfigSource config)
542 { 545 {
543 mesher = meshmerizer; 546 mesher = meshmerizer;
544 m_config = config; 547 // m_config = config;
545 } 548 }
546 549
547 public override void Dispose() 550 public override void Dispose()
@@ -1685,7 +1688,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin
1685// private PhysicsVector _staticVelocity; 1688// private PhysicsVector _staticVelocity;
1686// private AxiomQuaternion _staticOrientation; 1689// private AxiomQuaternion _staticOrientation;
1687 private float _mass; 1690 private float _mass;
1688 private BulletXScene _parentscene; 1691 // private BulletXScene _parentscene;
1689 internal float[] _heightField; 1692 internal float[] _heightField;
1690 private RigidBody _flatPlanet; 1693 private RigidBody _flatPlanet;
1691 1694
@@ -1700,7 +1703,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin
1700// _staticVelocity = new PhysicsVector(); 1703// _staticVelocity = new PhysicsVector();
1701// _staticOrientation = AxiomQuaternion.Identity; 1704// _staticOrientation = AxiomQuaternion.Identity;
1702 _mass = 0; //No active 1705 _mass = 0; //No active
1703 _parentscene = parent_scene; 1706 // _parentscene = parent_scene;
1704 _heightField = heightField; 1707 _heightField = heightField;
1705 1708
1706 float _linearDamping = 0.0f; 1709 float _linearDamping = 0.0f;
diff --git a/OpenSim/Region/Physics/Meshing/Extruder.cs b/OpenSim/Region/Physics/Meshing/Extruder.cs
index baa2d9b..ac8d81c 100644
--- a/OpenSim/Region/Physics/Meshing/Extruder.cs
+++ b/OpenSim/Region/Physics/Meshing/Extruder.cs
@@ -259,8 +259,8 @@ namespace OpenSim.Region.Physics.Meshing
259 { 259 {
260 Mesh result = new Mesh(); 260 Mesh result = new Mesh();
261 261
262 Quaternion tt = new Quaternion(); 262 // Quaternion tt = new Quaternion();
263 Vertex v2 = new Vertex(0, 0, 0); 263 // Vertex v2 = new Vertex(0, 0, 0);
264 264
265 Mesh newLayer; 265 Mesh newLayer;
266 Mesh lastLayer = null; 266 Mesh lastLayer = null;
@@ -441,8 +441,8 @@ namespace OpenSim.Region.Physics.Meshing
441 { 441 {
442 Mesh result = new Mesh(); 442 Mesh result = new Mesh();
443 443
444 Quaternion tt = new Quaternion(); 444 // Quaternion tt = new Quaternion();
445 Vertex v2 = new Vertex(0, 0, 0); 445 // Vertex v2 = new Vertex(0, 0, 0);
446 446
447 Mesh newLayer; 447 Mesh newLayer;
448 Mesh lastLayer = null; 448 Mesh lastLayer = null;
@@ -457,8 +457,8 @@ namespace OpenSim.Region.Physics.Meshing
457 if (System.Math.Abs(twistTotal) > (float)System.Math.PI * 1.5f) steps *= 2; 457 if (System.Math.Abs(twistTotal) > (float)System.Math.PI * 1.5f) steps *= 2;
458 if (System.Math.Abs(twistTotal) > (float)System.Math.PI * 3.0f) steps *= 2; 458 if (System.Math.Abs(twistTotal) > (float)System.Math.PI * 3.0f) steps *= 2;
459 459
460 double percentOfPathMultiplier = 1.0 / steps; 460 // double percentOfPathMultiplier = 1.0 / steps;
461 double angleStepMultiplier = System.Math.PI * 2.0 / steps; 461 // double angleStepMultiplier = System.Math.PI * 2.0 / steps;
462 462
463 float yPathScale = pathScaleY * 0.5f; 463 float yPathScale = pathScaleY * 0.5f;
464 float pathLength = pathCutEnd - pathCutBegin; 464 float pathLength = pathCutEnd - pathCutBegin;
diff --git a/OpenSim/Region/Physics/Meshing/HelperTypes.cs b/OpenSim/Region/Physics/Meshing/HelperTypes.cs
index f031fb6..aed6c45 100644
--- a/OpenSim/Region/Physics/Meshing/HelperTypes.cs
+++ b/OpenSim/Region/Physics/Meshing/HelperTypes.cs
@@ -221,6 +221,7 @@ public class Vertex : PhysicsVector, IComparable<Vertex>
221 v1.Z += am; 221 v1.Z += am;
222 return v1; 222 return v1;
223 } 223 }
224
224 public static Vertex operator -(Vertex v1, float am) 225 public static Vertex operator -(Vertex v1, float am)
225 { 226 {
226 v1.X -= am; 227 v1.X -= am;
@@ -228,6 +229,7 @@ public class Vertex : PhysicsVector, IComparable<Vertex>
228 v1.Z -= am; 229 v1.Z -= am;
229 return v1; 230 return v1;
230 } 231 }
232
231 public static Vertex operator *(Vertex v1, float am) 233 public static Vertex operator *(Vertex v1, float am)
232 { 234 {
233 v1.X *= am; 235 v1.X *= am;
@@ -235,6 +237,7 @@ public class Vertex : PhysicsVector, IComparable<Vertex>
235 v1.Z *= am; 237 v1.Z *= am;
236 return v1; 238 return v1;
237 } 239 }
240
238 public static Vertex operator /(Vertex v1, float am) 241 public static Vertex operator /(Vertex v1, float am)
239 { 242 {
240 if (am == 0f) 243 if (am == 0f)
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index 5a04a8e..879129a 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -432,8 +432,8 @@ namespace OpenSim.Region.Physics.Meshing
432 UInt16 taperY = primShape.PathScaleY; 432 UInt16 taperY = primShape.PathScaleY;
433 UInt16 pathShearX = primShape.PathShearX; 433 UInt16 pathShearX = primShape.PathShearX;
434 UInt16 pathShearY = primShape.PathShearY; 434 UInt16 pathShearY = primShape.PathShearY;
435 Int16 twistTop = primShape.PathTwistBegin; 435 // Int16 twistTop = primShape.PathTwistBegin;
436 Int16 twistBot = primShape.PathTwist; 436 // Int16 twistBot = primShape.PathTwist;
437 437
438#if SPAM 438#if SPAM
439 reportPrimParams("[BOX] " + primName, primShape); 439 reportPrimParams("[BOX] " + primName, primShape);
@@ -690,8 +690,8 @@ namespace OpenSim.Region.Physics.Meshing
690 UInt16 taperY = primShape.PathScaleY; 690 UInt16 taperY = primShape.PathScaleY;
691 UInt16 pathShearX = primShape.PathShearX; 691 UInt16 pathShearX = primShape.PathShearX;
692 UInt16 pathShearY = primShape.PathShearY; 692 UInt16 pathShearY = primShape.PathShearY;
693 Int16 twistBot = primShape.PathTwist; 693 // Int16 twistBot = primShape.PathTwist;
694 Int16 twistTop = primShape.PathTwistBegin; 694 // Int16 twistTop = primShape.PathTwistBegin;
695 695
696#if SPAM 696#if SPAM
697 reportPrimParams("[CYLINDER] " + primName, primShape); 697 reportPrimParams("[CYLINDER] " + primName, primShape);
@@ -1043,8 +1043,8 @@ namespace OpenSim.Region.Physics.Meshing
1043 UInt16 pathShearX = primShape.PathShearX; 1043 UInt16 pathShearX = primShape.PathShearX;
1044 UInt16 pathShearY = primShape.PathShearY; 1044 UInt16 pathShearY = primShape.PathShearY;
1045 1045
1046 Int16 twistTop = primShape.PathTwistBegin; 1046 // Int16 twistTop = primShape.PathTwistBegin;
1047 Int16 twistBot = primShape.PathTwist; 1047 // Int16 twistBot = primShape.PathTwist;
1048 1048
1049#if SPAM 1049#if SPAM
1050 reportPrimParams("[PRISM] " + primName, primShape); 1050 reportPrimParams("[PRISM] " + primName, primShape);
@@ -1295,13 +1295,13 @@ namespace OpenSim.Region.Physics.Meshing
1295 1295
1296 // Still have more to do here. 1296 // Still have more to do here.
1297 1297
1298 UInt16 hollowFactor = primShape.ProfileHollow; 1298 // UInt16 hollowFactor = primShape.ProfileHollow;
1299 UInt16 profileBegin = primShape.ProfileBegin; 1299 // UInt16 profileBegin = primShape.ProfileBegin;
1300 UInt16 profileEnd = primShape.ProfileEnd; 1300 // UInt16 profileEnd = primShape.ProfileEnd;
1301 UInt16 taperX = primShape.PathScaleX; 1301 // UInt16 taperX = primShape.PathScaleX;
1302 UInt16 taperY = primShape.PathScaleY; 1302 // UInt16 taperY = primShape.PathScaleY;
1303 UInt16 pathShearX = primShape.PathShearX; 1303 // UInt16 pathShearX = primShape.PathShearX;
1304 UInt16 pathShearY = primShape.PathShearY; 1304 // UInt16 pathShearY = primShape.PathShearY;
1305 Mesh m = new Mesh(); 1305 Mesh m = new Mesh();
1306 1306
1307#if SPAM 1307#if SPAM
@@ -1424,12 +1424,12 @@ namespace OpenSim.Region.Physics.Meshing
1424 UInt16 hollowFactor = primShape.ProfileHollow; 1424 UInt16 hollowFactor = primShape.ProfileHollow;
1425 UInt16 profileBegin = primShape.ProfileBegin; 1425 UInt16 profileBegin = primShape.ProfileBegin;
1426 UInt16 profileEnd = primShape.ProfileEnd; 1426 UInt16 profileEnd = primShape.ProfileEnd;
1427 UInt16 taperX = primShape.PathScaleX; 1427 // UInt16 taperX = primShape.PathScaleX;
1428 UInt16 taperY = primShape.PathScaleY; 1428 // UInt16 taperY = primShape.PathScaleY;
1429 UInt16 pathShearX = primShape.PathShearX; 1429 UInt16 pathShearX = primShape.PathShearX;
1430 UInt16 pathShearY = primShape.PathShearY; 1430 UInt16 pathShearY = primShape.PathShearY;
1431 Int16 twistBot = primShape.PathTwist; 1431 // Int16 twistBot = primShape.PathTwist;
1432 Int16 twistTop = primShape.PathTwistBegin; 1432 // Int16 twistTop = primShape.PathTwistBegin;
1433 HollowShape hollowShape = primShape.HollowShape; 1433 HollowShape hollowShape = primShape.HollowShape;
1434 1434
1435#if SPAM 1435#if SPAM
@@ -1706,7 +1706,7 @@ namespace OpenSim.Region.Physics.Meshing
1706 foreach (Triangle t in m.triangles) 1706 foreach (Triangle t in m.triangles)
1707 t.invertNormal(); 1707 t.invertNormal();
1708 1708
1709 Vertex vTemp = new Vertex(0.0f, 0.0f, 0.0f); 1709 // Vertex vTemp = new Vertex(0.0f, 0.0f, 0.0f);
1710 1710
1711 1711
1712 float skew = primShape.PathSkew * 0.01f; 1712 float skew = primShape.PathSkew * 0.01f;
@@ -2038,36 +2038,36 @@ namespace OpenSim.Region.Physics.Meshing
2038 return mesh; 2038 return mesh;
2039 } 2039 }
2040 2040
2041 private static void reportPrimParams(string name, PrimitiveBaseShape primShape) 2041// private static void reportPrimParams(string name, PrimitiveBaseShape primShape)
2042 { 2042// {
2043#if SPAM 2043// #if SPAM
2044 float pathShearX = primShape.PathShearX < 128 ? (float)primShape.PathShearX * 0.01f : (float)(primShape.PathShearX - 256) * 0.01f; 2044// float pathShearX = primShape.PathShearX < 128 ? (float)primShape.PathShearX * 0.01f : (float)(primShape.PathShearX - 256) * 0.01f;
2045 float pathShearY = primShape.PathShearY < 128 ? (float)primShape.PathShearY * 0.01f : (float)(primShape.PathShearY - 256) * 0.01f; 2045// float pathShearY = primShape.PathShearY < 128 ? (float)primShape.PathShearY * 0.01f : (float)(primShape.PathShearY - 256) * 0.01f;
2046 2046
2047 Console.WriteLine("********************* PrimitiveBaseShape Parameters *******************\n" 2047// Console.WriteLine("********************* PrimitiveBaseShape Parameters *******************\n"
2048 + "Name.............: " + name.ToString() + "\n" 2048// + "Name.............: " + name.ToString() + "\n"
2049 + "HollowShape......: " + primShape.HollowShape.ToString() + "\n" 2049// + "HollowShape......: " + primShape.HollowShape.ToString() + "\n"
2050 + "PathBegin........: " + primShape.PathBegin.ToString() + "\n" 2050// + "PathBegin........: " + primShape.PathBegin.ToString() + "\n"
2051 + "PathCurve........: " + primShape.PathCurve.ToString() + "\n" 2051// + "PathCurve........: " + primShape.PathCurve.ToString() + "\n"
2052 + "PathEnd..........: " + primShape.PathEnd.ToString() + "\n" 2052// + "PathEnd..........: " + primShape.PathEnd.ToString() + "\n"
2053 + "PathRadiusOffset.: " + primShape.PathRadiusOffset.ToString() + "\n" 2053// + "PathRadiusOffset.: " + primShape.PathRadiusOffset.ToString() + "\n"
2054 + "PathRevolutions..: " + primShape.PathRevolutions.ToString() + "\n" 2054// + "PathRevolutions..: " + primShape.PathRevolutions.ToString() + "\n"
2055 + "PathScaleX.......: " + primShape.PathScaleX.ToString() + "\n" 2055// + "PathScaleX.......: " + primShape.PathScaleX.ToString() + "\n"
2056 + "PathScaleY.......: " + primShape.PathScaleY.ToString() + "\n" 2056// + "PathScaleY.......: " + primShape.PathScaleY.ToString() + "\n"
2057 + "PathShearX.......: " + primShape.PathShearX.ToString() + " (" + pathShearX.ToString() + ")\n" 2057// + "PathShearX.......: " + primShape.PathShearX.ToString() + " (" + pathShearX.ToString() + ")\n"
2058 + "PathShearY.......: " + primShape.PathShearY.ToString() + " (" + pathShearY.ToString() + ")\n" 2058// + "PathShearY.......: " + primShape.PathShearY.ToString() + " (" + pathShearY.ToString() + ")\n"
2059 + "PathSkew.........: " + primShape.PathSkew.ToString() + "\n" 2059// + "PathSkew.........: " + primShape.PathSkew.ToString() + "\n"
2060 + "PathTaperX.......: " + primShape.PathTaperX.ToString() + "\n" 2060// + "PathTaperX.......: " + primShape.PathTaperX.ToString() + "\n"
2061 + "PathTaperY.......: " + primShape.PathTaperY.ToString() + "\n" 2061// + "PathTaperY.......: " + primShape.PathTaperY.ToString() + "\n"
2062 + "PathTwist........: " + primShape.PathTwist.ToString() + "\n" 2062// + "PathTwist........: " + primShape.PathTwist.ToString() + "\n"
2063 + "PathTwistBegin...: " + primShape.PathTwistBegin.ToString() + "\n" 2063// + "PathTwistBegin...: " + primShape.PathTwistBegin.ToString() + "\n"
2064 + "ProfileBegin.....: " + primShape.ProfileBegin.ToString() + "\n" 2064// + "ProfileBegin.....: " + primShape.ProfileBegin.ToString() + "\n"
2065 + "ProfileCurve.....: " + primShape.ProfileCurve.ToString() + "\n" 2065// + "ProfileCurve.....: " + primShape.ProfileCurve.ToString() + "\n"
2066 + "ProfileEnd.......: " + primShape.ProfileEnd.ToString() + "\n" 2066// + "ProfileEnd.......: " + primShape.ProfileEnd.ToString() + "\n"
2067 + "ProfileHollow....: " + primShape.ProfileHollow.ToString() + "\n" 2067// + "ProfileHollow....: " + primShape.ProfileHollow.ToString() + "\n"
2068 + "ProfileShape.....: " + primShape.ProfileShape.ToString() + "\n" 2068// + "ProfileShape.....: " + primShape.ProfileShape.ToString() + "\n"
2069 ); 2069// );
2070#endif 2070// #endif
2071 } 2071// }
2072 } 2072 }
2073} 2073}
diff --git a/OpenSim/Region/Physics/Meshing/SculptMesh.cs b/OpenSim/Region/Physics/Meshing/SculptMesh.cs
index c9933fe..95a244d 100644
--- a/OpenSim/Region/Physics/Meshing/SculptMesh.cs
+++ b/OpenSim/Region/Physics/Meshing/SculptMesh.cs
@@ -223,7 +223,7 @@ namespace OpenSim.Region.Physics.Meshing
223 Vertex v1 = new Vertex(0,0,0); 223 Vertex v1 = new Vertex(0,0,0);
224 224
225 // Create a vertex position from the RGB channels in the current pixel 225 // Create a vertex position from the RGB channels in the current pixel
226 int ypos = y * bLOD.Width; 226 // int ypos = y * bLOD.Width;
227 227
228 228
229 if (y == 0) 229 if (y == 0)
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index 89162a0..7f08cb4 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -59,7 +59,7 @@ namespace OpenSim.Region.Physics.OdePlugin
59 59
60 private PhysicsVector _position; 60 private PhysicsVector _position;
61 private d.Vector3 _zeroPosition; 61 private d.Vector3 _zeroPosition;
62 private d.Matrix3 m_StandUpRotation; 62 // private d.Matrix3 m_StandUpRotation;
63 private bool _zeroFlag = false; 63 private bool _zeroFlag = false;
64 private bool m_lastUpdateSent = false; 64 private bool m_lastUpdateSent = false;
65 private PhysicsVector _velocity; 65 private PhysicsVector _velocity;
@@ -92,7 +92,7 @@ namespace OpenSim.Region.Physics.OdePlugin
92 92
93 private float m_buoyancy = 0f; 93 private float m_buoyancy = 0f;
94 94
95 private CollisionLocker ode; 95 // private CollisionLocker ode;
96 96
97 private string m_name = String.Empty; 97 private string m_name = String.Empty;
98 98
@@ -120,7 +120,7 @@ namespace OpenSim.Region.Physics.OdePlugin
120 120
121 public OdeCharacter(String avName, OdeScene parent_scene, PhysicsVector pos, CollisionLocker dode, PhysicsVector size, float pid_d, float pid_p, float capsule_radius, float tensor, float density, float height_fudge_factor, float walk_divisor, float rundivisor) 121 public OdeCharacter(String avName, OdeScene parent_scene, PhysicsVector pos, CollisionLocker dode, PhysicsVector size, float pid_d, float pid_p, float capsule_radius, float tensor, float density, float height_fudge_factor, float walk_divisor, float rundivisor)
122 { 122 {
123 ode = dode; 123 // ode = dode;
124 _velocity = new PhysicsVector(); 124 _velocity = new PhysicsVector();
125 _target_velocity = new PhysicsVector(); 125 _target_velocity = new PhysicsVector();
126 _position = pos; 126 _position = pos;
@@ -137,9 +137,9 @@ namespace OpenSim.Region.Physics.OdePlugin
137 runDivisor = rundivisor; 137 runDivisor = rundivisor;
138 138
139 139
140 m_StandUpRotation = 140 // m_StandUpRotation =
141 new d.Matrix3(0.5f, 0.7071068f, 0.5f, -0.7071068f, 0f, 0.7071068f, 0.5f, -0.7071068f, 141 // new d.Matrix3(0.5f, 0.7071068f, 0.5f, -0.7071068f, 0f, 0.7071068f, 0.5f, -0.7071068f,
142 0.5f); 142 // 0.5f);
143 143
144 for (int i = 0; i < 11; i++) 144 for (int i = 0; i < 11; i++)
145 { 145 {
@@ -392,7 +392,7 @@ namespace OpenSim.Region.Physics.OdePlugin
392 392
393 PhysicsVector SetSize = value; 393 PhysicsVector SetSize = value;
394 float prevCapsule = CAPSULE_LENGTH; 394 float prevCapsule = CAPSULE_LENGTH;
395 float capsuleradius = CAPSULE_RADIUS; 395 // float capsuleradius = CAPSULE_RADIUS;
396 //capsuleradius = 0.2f; 396 //capsuleradius = 0.2f;
397 397
398 CAPSULE_LENGTH = (SetSize.Z - ((SetSize.Z * heightFudgeFactor))); // subtract 43% of the size 398 CAPSULE_LENGTH = (SetSize.Z - ((SetSize.Z * heightFudgeFactor))); // subtract 43% of the size
@@ -747,7 +747,8 @@ namespace OpenSim.Region.Physics.OdePlugin
747 { 747 {
748 // we're not colliding and we're not flying so that means we're falling! 748 // we're not colliding and we're not flying so that means we're falling!
749 // m_iscolliding includes collisions with the ground. 749 // m_iscolliding includes collisions with the ground.
750 d.Vector3 pos = d.BodyGetPosition(Body); 750
751 // d.Vector3 pos = d.BodyGetPosition(Body);
751 if (_target_velocity.X > 0) 752 if (_target_velocity.X > 0)
752 { 753 {
753 vec.X = ((_target_velocity.X - vel.X)/1.2f)*PID_D; 754 vec.X = ((_target_velocity.X - vel.X)/1.2f)*PID_D;
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 507030b..defc0ca 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.Physics.OdePlugin
53 private PhysicsVector m_rotationalVelocity; 53 private PhysicsVector m_rotationalVelocity;
54 private PhysicsVector _size; 54 private PhysicsVector _size;
55 private PhysicsVector _acceleration; 55 private PhysicsVector _acceleration;
56 private d.Vector3 _zeroPosition = new d.Vector3(0.0f, 0.0f, 0.0f); 56 // private d.Vector3 _zeroPosition = new d.Vector3(0.0f, 0.0f, 0.0f);
57 private Quaternion _orientation; 57 private Quaternion _orientation;
58 private PhysicsVector m_taintposition; 58 private PhysicsVector m_taintposition;
59 private PhysicsVector m_taintsize; 59 private PhysicsVector m_taintsize;
@@ -1067,8 +1067,8 @@ namespace OpenSim.Region.Physics.OdePlugin
1067 } 1067 }
1068 else 1068 else
1069 { 1069 {
1070 string primScenAvatarIn = _parent_scene.whichspaceamIin(_position); 1070 // string primScenAvatarIn = _parent_scene.whichspaceamIin(_position);
1071 int[] arrayitem = _parent_scene.calculateSpaceArrayItemFromPos(_position); 1071 // int[] arrayitem = _parent_scene.calculateSpaceArrayItemFromPos(_position);
1072 _parent_scene.waitForSpaceUnlock(m_targetSpace); 1072 _parent_scene.waitForSpaceUnlock(m_targetSpace);
1073 1073
1074 IntPtr tempspace = _parent_scene.recalculateSpaceForGeom(prim_geom, _position, m_targetSpace); 1074 IntPtr tempspace = _parent_scene.recalculateSpaceForGeom(prim_geom, _position, m_targetSpace);
@@ -1141,7 +1141,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1141 } 1141 }
1142 //PidStatus = true; 1142 //PidStatus = true;
1143 1143
1144 PhysicsVector vec = new PhysicsVector(); 1144 // PhysicsVector vec = new PhysicsVector();
1145 d.Vector3 vel = d.BodyGetLinearVel(Body); 1145 d.Vector3 vel = d.BodyGetLinearVel(Body);
1146 1146
1147 d.Vector3 pos = d.BodyGetPosition(Body); 1147 d.Vector3 pos = d.BodyGetPosition(Body);
@@ -1201,7 +1201,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1201 } 1201 }
1202 else 1202 else
1203 { 1203 {
1204 _zeroPosition = d.BodyGetPosition(Body); 1204 // _zeroPosition = d.BodyGetPosition(Body);
1205 return; 1205 return;
1206 } 1206 }
1207 } 1207 }
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 876629e..3dd80ea 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -117,7 +117,7 @@ namespace OpenSim.Region.Physics.OdePlugin
117 public class OdeScene : PhysicsScene 117 public class OdeScene : PhysicsScene
118 { 118 {
119 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 119 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
120 private Dictionary<string, sCollisionData> m_storedCollisions = new Dictionary<string, sCollisionData>(); 120 // private Dictionary<string, sCollisionData> m_storedCollisions = new Dictionary<string, sCollisionData>();
121 121
122 CollisionLocker ode; 122 CollisionLocker ode;
123 123
@@ -196,7 +196,7 @@ namespace OpenSim.Region.Physics.OdePlugin
196 196
197 private float[] _watermap; 197 private float[] _watermap;
198 198
199 private float[] _origheightmap; 199 // private float[] _origheightmap;
200 200
201 private d.NearCallback nearCallback; 201 private d.NearCallback nearCallback;
202 public d.TriCallback triCallback; 202 public d.TriCallback triCallback;
@@ -226,7 +226,7 @@ namespace OpenSim.Region.Physics.OdePlugin
226//Ckrinke private int ms = 0; 226//Ckrinke private int ms = 0;
227 public IntPtr world; 227 public IntPtr world;
228 //private bool returncollisions = false; 228 //private bool returncollisions = false;
229 private uint obj1LocalID = 0; 229 // private uint obj1LocalID = 0;
230 private uint obj2LocalID = 0; 230 private uint obj2LocalID = 0;
231 //private int ctype = 0; 231 //private int ctype = 0;
232 private OdeCharacter cc1; 232 private OdeCharacter cc1;
@@ -501,7 +501,7 @@ namespace OpenSim.Region.Physics.OdePlugin
501 IntPtr b1 = d.GeomGetBody(g1); 501 IntPtr b1 = d.GeomGetBody(g1);
502 IntPtr b2 = d.GeomGetBody(g2); 502 IntPtr b2 = d.GeomGetBody(g2);
503 503
504 d.GeomClassID id = d.GeomGetClass(g1); 504 // d.GeomClassID id = d.GeomGetClass(g1);
505 505
506 String name1 = null; 506 String name1 = null;
507 String name2 = null; 507 String name2 = null;
@@ -837,7 +837,7 @@ namespace OpenSim.Region.Physics.OdePlugin
837 837
838 private void collision_accounting_events(PhysicsActor p1, PhysicsActor p2, float collisiondepth) 838 private void collision_accounting_events(PhysicsActor p1, PhysicsActor p2, float collisiondepth)
839 { 839 {
840 obj1LocalID = 0; 840 // obj1LocalID = 0;
841 //returncollisions = false; 841 //returncollisions = false;
842 obj2LocalID = 0; 842 obj2LocalID = 0;
843 //ctype = 0; 843 //ctype = 0;
@@ -850,7 +850,7 @@ namespace OpenSim.Region.Physics.OdePlugin
850 case ActorTypes.Agent: 850 case ActorTypes.Agent:
851 cc2 = (OdeCharacter)p2; 851 cc2 = (OdeCharacter)p2;
852 852
853 obj1LocalID = cc2.m_localID; 853 // obj1LocalID = cc2.m_localID;
854 switch ((ActorTypes)p1.PhysicsActorType) 854 switch ((ActorTypes)p1.PhysicsActorType)
855 { 855 {
856 case ActorTypes.Agent: 856 case ActorTypes.Agent:
@@ -893,7 +893,7 @@ namespace OpenSim.Region.Physics.OdePlugin
893 case ActorTypes.Prim: 893 case ActorTypes.Prim:
894 cp2 = (OdePrim)p2; 894 cp2 = (OdePrim)p2;
895 895
896 obj1LocalID = cp2.m_localID; 896 // obj1LocalID = cp2.m_localID;
897 switch ((ActorTypes)p1.PhysicsActorType) 897 switch ((ActorTypes)p1.PhysicsActorType)
898 { 898 {
899 case ActorTypes.Agent: 899 case ActorTypes.Agent:
@@ -2084,7 +2084,7 @@ namespace OpenSim.Region.Physics.OdePlugin
2084 { 2084 {
2085 // this._heightmap[i] = (double)heightMap[i]; 2085 // this._heightmap[i] = (double)heightMap[i];
2086 // dbm (danx0r) -- creating a buffer zone of one extra sample all around 2086 // dbm (danx0r) -- creating a buffer zone of one extra sample all around
2087 _origheightmap = heightMap; 2087 // _origheightmap = heightMap;
2088 const uint heightmapWidth = m_regionWidth + 2; 2088 const uint heightmapWidth = m_regionWidth + 2;
2089 const uint heightmapHeight = m_regionHeight + 2; 2089 const uint heightmapHeight = m_regionHeight + 2;
2090 const uint heightmapWidthSamples = 2*m_regionWidth + 2; 2090 const uint heightmapWidthSamples = 2*m_regionWidth + 2;