aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/ODECharacter.cs')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index 499422f..2efca3b 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -87,6 +87,8 @@ namespace OpenSim.Region.Physics.OdePlugin
87 private bool m_hackSentFall = false; 87 private bool m_hackSentFall = false;
88 private bool m_hackSentFly = false; 88 private bool m_hackSentFly = false;
89 private bool m_foundDebian = false; 89 private bool m_foundDebian = false;
90 public uint m_localID = 0;
91
90 private CollisionLocker ode; 92 private CollisionLocker ode;
91 93
92 private string m_name = String.Empty; 94 private string m_name = String.Empty;
@@ -94,6 +96,15 @@ namespace OpenSim.Region.Physics.OdePlugin
94 private bool[] m_colliderarr = new bool[11]; 96 private bool[] m_colliderarr = new bool[11];
95 private bool[] m_colliderGroundarr = new bool[11]; 97 private bool[] m_colliderGroundarr = new bool[11];
96 98
99 // Default we're a Character
100 private CollisionCategories m_collisionCategories = (CollisionCategories.Character);
101
102 // Default, Collide with Other Geometries, spaces, bodies and characters.
103 private CollisionCategories m_collisionFlags = (CollisionCategories.Geom
104 | CollisionCategories.Space
105 | CollisionCategories.Body
106 | CollisionCategories.Character
107 | CollisionCategories.Land);
97 108
98 private bool jumping = false; 109 private bool jumping = false;
99 //private float gravityAccel; 110 //private float gravityAccel;
@@ -157,6 +168,11 @@ namespace OpenSim.Region.Physics.OdePlugin
157 set { m_alwaysRun = value; } 168 set { m_alwaysRun = value; }
158 } 169 }
159 170
171 public override uint LocalID
172 {
173 set { m_localID = value; }
174 }
175
160 public override bool Grabbed 176 public override bool Grabbed
161 { 177 {
162 set { return; } 178 set { return; }
@@ -404,6 +420,10 @@ namespace OpenSim.Region.Physics.OdePlugin
404 int dAMotorEuler = 1; 420 int dAMotorEuler = 1;
405 _parent_scene.waitForSpaceUnlock(_parent_scene.space); 421 _parent_scene.waitForSpaceUnlock(_parent_scene.space);
406 Shell = d.CreateCapsule(_parent_scene.space, CAPSULE_RADIUS, CAPSULE_LENGTH); 422 Shell = d.CreateCapsule(_parent_scene.space, CAPSULE_RADIUS, CAPSULE_LENGTH);
423
424 d.GeomSetCategoryBits(Shell, (int)m_collisionCategories);
425 d.GeomSetCollideBits(Shell, (int)m_collisionFlags);
426
407 d.MassSetCapsuleTotal(out ShellMass, m_mass, 2, CAPSULE_RADIUS, CAPSULE_LENGTH); 427 d.MassSetCapsuleTotal(out ShellMass, m_mass, 2, CAPSULE_RADIUS, CAPSULE_LENGTH);
408 Body = d.BodyCreate(_parent_scene.world); 428 Body = d.BodyCreate(_parent_scene.world);
409 d.BodySetPosition(Body, npositionX, npositionY, npositionZ); 429 d.BodySetPosition(Body, npositionX, npositionY, npositionZ);