aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs')
-rw-r--r--OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs33
1 files changed, 16 insertions, 17 deletions
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs b/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs
index b35c299..98bfd1c 100644
--- a/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs
@@ -29,7 +29,6 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using OpenMetaverse; 31using OpenMetaverse;
32using Ode.NET;
33using OpenSim.Framework; 32using OpenSim.Framework;
34using OpenSim.Region.PhysicsModules.SharedBase; 33using OpenSim.Region.PhysicsModules.SharedBase;
35using log4net; 34using log4net;
@@ -150,7 +149,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
150 /// Collision geometry 149 /// Collision geometry
151 /// </summary> 150 /// </summary>
152 internal IntPtr Shell { get; private set; } 151 internal IntPtr Shell { get; private set; }
153 152
154 private IntPtr Amotor = IntPtr.Zero; 153 private IntPtr Amotor = IntPtr.Zero;
155 private d.Mass ShellMass; 154 private d.Mass ShellMass;
156 155
@@ -238,7 +237,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
238 m_tainted_isPhysical = true; // new tainted status: need to create ODE information 237 m_tainted_isPhysical = true; // new tainted status: need to create ODE information
239 238
240 _parent_scene.AddPhysicsActorTaint(this); 239 _parent_scene.AddPhysicsActorTaint(this);
241 240
242 Name = avName; 241 Name = avName;
243 } 242 }
244 243
@@ -280,7 +279,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
280 279
281 public override bool IsPhysical 280 public override bool IsPhysical
282 { 281 {
283 get { return false; } 282 get { return m_isPhysical; }
284 set { return; } 283 set { return; }
285 } 284 }
286 285
@@ -462,7 +461,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
462 value.Z = _parent_scene.GetTerrainHeightAtXY(127, 127) + 5; 461 value.Z = _parent_scene.GetTerrainHeightAtXY(127, 127) + 5;
463 } 462 }
464 463
465 m_taintPosition = value; 464 m_taintPosition = value;
466 _parent_scene.AddPhysicsActorTaint(this); 465 _parent_scene.AddPhysicsActorTaint(this);
467 } 466 }
468 else 467 else
@@ -595,7 +594,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
595 594
596 public override void delink() {} 595 public override void delink() {}
597 596
598 public override void LockAngularMotion(Vector3 axis) {} 597 public override void LockAngularMotion(byte axislocks) {}
599 598
600// This code is very useful. Written by DanX0r. We're just not using it right now. 599// This code is very useful. Written by DanX0r. We're just not using it right now.
601// Commented out to prevent a warning. 600// Commented out to prevent a warning.
@@ -797,7 +796,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
797 internal void Move(List<OdeCharacter> defects) 796 internal void Move(List<OdeCharacter> defects)
798 { 797 {
799 // no lock; for now it's only called from within Simulate() 798 // no lock; for now it's only called from within Simulate()
800 799
801 // If the PID Controller isn't active then we set our force 800 // If the PID Controller isn't active then we set our force
802 // calculating base velocity to the current position 801 // calculating base velocity to the current position
803 802
@@ -812,7 +811,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
812 811
813 d.Vector3 localpos = d.BodyGetPosition(Body); 812 d.Vector3 localpos = d.BodyGetPosition(Body);
814 Vector3 localPos = new Vector3(localpos.X, localpos.Y, localpos.Z); 813 Vector3 localPos = new Vector3(localpos.X, localpos.Y, localpos.Z);
815 814
816 if (!localPos.IsFinite()) 815 if (!localPos.IsFinite())
817 { 816 {
818 m_log.WarnFormat( 817 m_log.WarnFormat(
@@ -1105,8 +1104,8 @@ namespace OpenSim.Region.PhysicsModule.ODE
1105// lock (OdeScene.UniversalColliderSyncObject) 1104// lock (OdeScene.UniversalColliderSyncObject)
1106 Shell = d.CreateCapsule(_parent_scene.space, CAPSULE_RADIUS, CAPSULE_LENGTH); 1105 Shell = d.CreateCapsule(_parent_scene.space, CAPSULE_RADIUS, CAPSULE_LENGTH);
1107 1106
1108 d.GeomSetCategoryBits(Shell, (int)m_collisionCategories); 1107 d.GeomSetCategoryBits(Shell, (uint)m_collisionCategories);
1109 d.GeomSetCollideBits(Shell, (int)m_collisionFlags); 1108 d.GeomSetCollideBits(Shell, (uint)m_collisionFlags);
1110 1109
1111 d.MassSetCapsuleTotal(out ShellMass, m_mass, 2, CAPSULE_RADIUS, CAPSULE_LENGTH); 1110 d.MassSetCapsuleTotal(out ShellMass, m_mass, 2, CAPSULE_RADIUS, CAPSULE_LENGTH);
1112 Body = d.BodyCreate(_parent_scene.world); 1111 Body = d.BodyCreate(_parent_scene.world);
@@ -1249,18 +1248,18 @@ namespace OpenSim.Region.PhysicsModule.ODE
1249 } 1248 }
1250 1249
1251 public override Vector3 PIDTarget { set { return; } } 1250 public override Vector3 PIDTarget { set { return; } }
1252 public override bool PIDActive 1251 public override bool PIDActive
1253 { 1252 {
1254 get { return false; } 1253 get { return false; }
1255 set { return; } 1254 set { return; }
1256 } 1255 }
1257 public override float PIDTau { set { return; } } 1256 public override float PIDTau { set { return; } }
1258 1257
1259 public override float PIDHoverHeight { set { return; } } 1258 public override float PIDHoverHeight { set { return; } }
1260 public override bool PIDHoverActive { set { return; } } 1259 public override bool PIDHoverActive {get {return false;} set { return; } }
1261 public override PIDHoverType PIDHoverType { set { return; } } 1260 public override PIDHoverType PIDHoverType { set { return; } }
1262 public override float PIDHoverTau { set { return; } } 1261 public override float PIDHoverTau { set { return; } }
1263 1262
1264 public override Quaternion APIDTarget{ set { return; } } 1263 public override Quaternion APIDTarget{ set { return; } }
1265 1264
1266 public override bool APIDActive{ set { return; } } 1265 public override bool APIDActive{ set { return; } }
@@ -1291,7 +1290,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1291 m_eventsubscription = 0; 1290 m_eventsubscription = 0;
1292 } 1291 }
1293 1292
1294 internal void AddCollisionEvent(uint CollidedWith, ContactPoint contact) 1293 public override void AddCollisionEvent(uint CollidedWith, ContactPoint contact)
1295 { 1294 {
1296 if (m_eventsubscription > 0) 1295 if (m_eventsubscription > 0)
1297 { 1296 {
@@ -1370,7 +1369,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1370// m_log.DebugFormat( 1369// m_log.DebugFormat(
1371// "[ODE CHARACTER]: Changing capsule size from {0} to {1} for {2}", 1370// "[ODE CHARACTER]: Changing capsule size from {0} to {1} for {2}",
1372// CAPSULE_LENGTH, m_tainted_CAPSULE_LENGTH, Name); 1371// CAPSULE_LENGTH, m_tainted_CAPSULE_LENGTH, Name);
1373 1372
1374 m_pidControllerActive = true; 1373 m_pidControllerActive = true;
1375 1374
1376 // no lock needed on _parent_scene.OdeLock because we are called from within the thread lock in OdePlugin's simulate() 1375 // no lock needed on _parent_scene.OdeLock because we are called from within the thread lock in OdePlugin's simulate()