aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs38
1 files changed, 22 insertions, 16 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index 9c7e0ef..9200016 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -199,9 +199,11 @@ namespace OpenSim.Region.Physics.OdePlugin
199 { 199 {
200 m_colliderarr[i] = false; 200 m_colliderarr[i] = false;
201 } 201 }
202 CAPSULE_LENGTH = (size.Z * 1.15f) - CAPSULE_RADIUS * 2.0f; 202
203 //m_log.Info("[ODE CHARACTER]: " + CAPSULE_LENGTH.ToString()); 203 // We can set taint and actual to be the same here, since the entire character will be set up when the
204 m_tainted_CAPSULE_LENGTH = CAPSULE_LENGTH; 204 // m_tainted_isPhysical is processed.
205 SetTaintedCapsuleLength(size);
206 CAPSULE_LENGTH = m_tainted_CAPSULE_LENGTH;
205 207
206 m_isPhysical = false; // current status: no ODE information exists 208 m_isPhysical = false; // current status: no ODE information exists
207 m_tainted_isPhysical = true; // new tainted status: need to create ODE information 209 m_tainted_isPhysical = true; // new tainted status: need to create ODE information
@@ -457,24 +459,28 @@ namespace OpenSim.Region.Physics.OdePlugin
457 get { return new Vector3(CAPSULE_RADIUS * 2, CAPSULE_RADIUS * 2, CAPSULE_LENGTH); } 459 get { return new Vector3(CAPSULE_RADIUS * 2, CAPSULE_RADIUS * 2, CAPSULE_LENGTH); }
458 set 460 set
459 { 461 {
460 if (value.IsFinite()) 462 SetTaintedCapsuleLength(value);
461 {
462 m_pidControllerActive = true;
463
464 Vector3 SetSize = value;
465 m_tainted_CAPSULE_LENGTH = (SetSize.Z * 1.15f) - CAPSULE_RADIUS * 2.0f;
466// m_log.Info("[ODE CHARACTER]: " + CAPSULE_LENGTH);
467 463
468 // If we reset velocity here, then an avatar stalls when it crosses a border for the first time 464 // If we reset velocity here, then an avatar stalls when it crosses a border for the first time
469 // (as the height of the new root agent is set). 465 // (as the height of the new root agent is set).
470// Velocity = Vector3.Zero; 466// Velocity = Vector3.Zero;
471 467
472 _parent_scene.AddPhysicsActorTaint(this); 468 _parent_scene.AddPhysicsActorTaint(this);
473 } 469 }
474 else 470 }
475 { 471
476 m_log.WarnFormat("[ODE CHARACTER]: Got a NaN Size from Scene on {0}", Name); 472 private void SetTaintedCapsuleLength(Vector3 size)
477 } 473 {
474 if (size.IsFinite())
475 {
476 m_pidControllerActive = true;
477
478 m_tainted_CAPSULE_LENGTH = (size.Z * 1.15f) - CAPSULE_RADIUS * 2.0f;
479// m_log.Info("[ODE CHARACTER]: " + CAPSULE_LENGTH);
480 }
481 else
482 {
483 m_log.WarnFormat("[ODE CHARACTER]: Got a NaN Size for {0} in {1}", Name, _parent_scene.Name);
478 } 484 }
479 } 485 }
480 486