aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin
diff options
context:
space:
mode:
Diffstat (limited to '')
-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
3 files changed, 22 insertions, 21 deletions
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;