From 5f2a65c9762f626bc3389bcd85ae20e45aa09b04 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 20 Mar 2012 20:28:58 +0000
Subject: refactor: Eliminate unnecessary duplicate avCapsuleTilted
---
OpenSim/Region/Physics/OdePlugin/OdeScene.cs | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region/Physics/OdePlugin/OdeScene.cs')
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
index 598530c..1f8c2ca 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
@@ -181,8 +181,12 @@ namespace OpenSim.Region.Physics.OdePlugin
private float avPIDP = 1400f;
private float avCapRadius = 0.37f;
private float avStandupTensor = 2000000f;
- private bool avCapsuleTilted = true; // true = old compatibility mode with leaning capsule; false = new corrected mode
- public bool IsAvCapsuleTilted { get { return avCapsuleTilted; } set { avCapsuleTilted = value; } }
+
+ ///
+ /// true = old compatibility mode with leaning capsule; false = new corrected mode
+ ///
+ public bool IsAvCapsuleTilted { get; private set; }
+
private float avDensity = 80f;
// private float avHeightFudgeFactor = 0.52f;
private float avMovementDivisorWalk = 1.3f;
@@ -501,7 +505,7 @@ namespace OpenSim.Region.Physics.OdePlugin
avMovementDivisorWalk = physicsconfig.GetFloat("av_movement_divisor_walk", 1.3f);
avMovementDivisorRun = physicsconfig.GetFloat("av_movement_divisor_run", 0.8f);
avCapRadius = physicsconfig.GetFloat("av_capsule_radius", 0.37f);
- avCapsuleTilted = physicsconfig.GetBoolean("av_capsule_tilted", false);
+ IsAvCapsuleTilted = physicsconfig.GetBoolean("av_capsule_tilted", false);
contactsPerCollision = physicsconfig.GetInt("contacts_per_collision", 80);
--
cgit v1.1
From 86bd287b5346063edb0f62ceb96ee08c6ee80c18 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 20 Mar 2012 20:39:33 +0000
Subject: refactor: precalculate the fixed movement factor for avatar tilting
(sqrt(2)) rather than doing it multiple times on every move.
---
OpenSim/Region/Physics/OdePlugin/OdeScene.cs | 3 +++
1 file changed, 3 insertions(+)
(limited to 'OpenSim/Region/Physics/OdePlugin/OdeScene.cs')
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
index 1f8c2ca..842ff91 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
@@ -185,6 +185,9 @@ namespace OpenSim.Region.Physics.OdePlugin
///
/// true = old compatibility mode with leaning capsule; false = new corrected mode
///
+ ///
+ /// Even when set to false, the capsule still tilts but this is done in a different way.
+ ///
public bool IsAvCapsuleTilted { get; private set; }
private float avDensity = 80f;
--
cgit v1.1