From 20da04fd0c909a00c0cdc2585f242e95c868801a Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 13 Oct 2011 21:42:24 +0100
Subject: More method doc and formatting changes. Makes DestroyOdeStructures()
private
---
OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
(limited to 'OpenSim/Region/Physics/OdePlugin')
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index 92927e4..7f3ae6b 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -886,7 +886,6 @@ namespace OpenSim.Region.Physics.OdePlugin
d.BodyAddForce(Body, force.X, force.Y, force.Z);
//d.BodySetRotation(Body, ref m_StandUpRotation);
//standupStraight();
-
}
}
@@ -901,7 +900,8 @@ namespace OpenSim.Region.Physics.OdePlugin
///
///
/// If there is something wrong with the character (e.g. its position is non-finite)
- /// then it is added to this list. The ODE structures associated with it are also destroyed.
+ /// then it is added to this list. The ODE structures associated with it are also destroyed.
+ ///
public void Move(float timeStep, List defects)
{
// no lock; for now it's only called from within Simulate()
@@ -966,7 +966,7 @@ namespace OpenSim.Region.Physics.OdePlugin
d.Vector3 pos = d.BodyGetPosition(Body);
vec.X = (_target_velocity.X - vel.X) * (PID_D) + (_zeroPosition.X - pos.X) * (PID_P * 2);
- vec.Y = (_target_velocity.Y - vel.Y)*(PID_D) + (_zeroPosition.Y - pos.Y)* (PID_P * 2);
+ vec.Y = (_target_velocity.Y - vel.Y) * (PID_D) + (_zeroPosition.Y - pos.Y)* (PID_P * 2);
if (flying)
{
vec.Z = (_target_velocity.Z - vel.Z) * (PID_D) + (_zeroPosition.Z - pos.Z) * PID_P;
@@ -995,6 +995,10 @@ namespace OpenSim.Region.Physics.OdePlugin
// we're in mid air suspended
vec.X = ((_target_velocity.X / movementdivisor) - vel.X) * (PID_D / 6);
vec.Y = ((_target_velocity.Y / movementdivisor) - vel.Y) * (PID_D / 6);
+
+// m_log.DebugFormat(
+// "[ODE CHARACTER]: !m_iscolliding && flying, vec {0}, _target_velocity {1}, movementdivisor {2}, vel {3}",
+// vec, _target_velocity, movementdivisor, vel);
}
if (m_iscolliding && !flying && _target_velocity.Z > 0.0f)
@@ -1020,11 +1024,11 @@ namespace OpenSim.Region.Physics.OdePlugin
// d.Vector3 pos = d.BodyGetPosition(Body);
if (_target_velocity.X > 0)
{
- vec.X = ((_target_velocity.X - vel.X)/1.2f)*PID_D;
+ vec.X = ((_target_velocity.X - vel.X) / 1.2f) * PID_D;
}
if (_target_velocity.Y > 0)
{
- vec.Y = ((_target_velocity.Y - vel.Y)/1.2f)*PID_D;
+ vec.Y = ((_target_velocity.Y - vel.Y) / 1.2f) * PID_D;
}
}
@@ -1167,7 +1171,7 @@ namespace OpenSim.Region.Physics.OdePlugin
///
/// Used internally to destroy the ODE structures associated with this character.
///
- public void DestroyOdeStructures()
+ private void DestroyOdeStructures()
{
// destroy avatar capsule and related ODE data
if (Amotor != IntPtr.Zero)
--
cgit v1.1