aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
diff options
context:
space:
mode:
authorDiva Canto2014-11-21 08:54:30 -0800
committerDiva Canto2014-11-21 08:54:30 -0800
commit8d3cb424a8730a0d0cdea42e513057c2c3fff679 (patch)
tree611eb8cd3c3526e1f41058ed000e1c3f9f644cf8 /OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
parentCleanup extraneous comments from viewer support modules (diff)
parentLSL key should be implicitly cast to a boolean value (diff)
downloadopensim-SC-8d3cb424a8730a0d0cdea42e513057c2c3fff679.zip
opensim-SC-8d3cb424a8730a0d0cdea42e513057c2c3fff679.tar.gz
opensim-SC-8d3cb424a8730a0d0cdea42e513057c2c3fff679.tar.bz2
opensim-SC-8d3cb424a8730a0d0cdea42e513057c2c3fff679.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/ODEPrim.cs')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs11
1 files changed, 5 insertions, 6 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 13c69d6..e347fdc 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -114,7 +114,6 @@ namespace OpenSim.Region.Physics.OdePlugin
114 private float m_PIDTau; 114 private float m_PIDTau;
115 private float PID_D = 35f; 115 private float PID_D = 35f;
116 private float PID_G = 25f; 116 private float PID_G = 25f;
117 private bool m_usePID;
118 117
119 // KF: These next 7 params apply to llSetHoverHeight(float height, integer water, float tau), 118 // KF: These next 7 params apply to llSetHoverHeight(float height, integer water, float tau),
120 // and are for non-VEHICLES only. 119 // and are for non-VEHICLES only.
@@ -1723,7 +1722,7 @@ Console.WriteLine(" JointCreateFixed");
1723 // gravityz multiplier = 1 - m_buoyancy 1722 // gravityz multiplier = 1 - m_buoyancy
1724 fz = _parent_scene.gravityz * (1.0f - m_buoyancy) * m_mass; 1723 fz = _parent_scene.gravityz * (1.0f - m_buoyancy) * m_mass;
1725 1724
1726 if (m_usePID) 1725 if (PIDActive)
1727 { 1726 {
1728//Console.WriteLine("PID " + Name); 1727//Console.WriteLine("PID " + Name);
1729 // KF - this is for object move? eg. llSetPos() ? 1728 // KF - this is for object move? eg. llSetPos() ?
@@ -1792,10 +1791,10 @@ Console.WriteLine(" JointCreateFixed");
1792 1791
1793 fz = fz + ((_target_velocity.Z - vel.Z) * (PID_D) * m_mass); 1792 fz = fz + ((_target_velocity.Z - vel.Z) * (PID_D) * m_mass);
1794 } 1793 }
1795 } // end if (m_usePID) 1794 } // end if (PIDActive)
1796 1795
1797 // Hover PID Controller needs to be mutually exlusive to MoveTo PID controller 1796 // Hover PID Controller needs to be mutually exlusive to MoveTo PID controller
1798 if (m_useHoverPID && !m_usePID) 1797 if (m_useHoverPID && !PIDActive)
1799 { 1798 {
1800//Console.WriteLine("Hover " + Name); 1799//Console.WriteLine("Hover " + Name);
1801 1800
@@ -2866,7 +2865,7 @@ Console.WriteLine(" JointCreateFixed");
2866 // it does make sense to do this for tiny little instabilities with physical prim, however 0.5m/frame is fairly large. 2865 // it does make sense to do this for tiny little instabilities with physical prim, however 0.5m/frame is fairly large.
2867 // reducing this to 0.02m/frame seems to help the angular rubberbanding quite a bit, however, to make sure it doesn't affect elevators and vehicles 2866 // reducing this to 0.02m/frame seems to help the angular rubberbanding quite a bit, however, to make sure it doesn't affect elevators and vehicles
2868 // adding these logical exclusion situations to maintain this where I think it was intended to be. 2867 // adding these logical exclusion situations to maintain this where I think it was intended to be.
2869 if (m_throttleUpdates || m_usePID || (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE) || (Amotor != IntPtr.Zero)) 2868 if (m_throttleUpdates || PIDActive || (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE) || (Amotor != IntPtr.Zero))
2870 { 2869 {
2871 m_minvelocity = 0.5f; 2870 m_minvelocity = 0.5f;
2872 } 2871 }
@@ -2947,7 +2946,7 @@ Console.WriteLine(" JointCreateFixed");
2947 m_log.WarnFormat("[PHYSICS]: Got NaN PIDTarget from Scene on Object {0}", Name); 2946 m_log.WarnFormat("[PHYSICS]: Got NaN PIDTarget from Scene on Object {0}", Name);
2948 } 2947 }
2949 } 2948 }
2950 public override bool PIDActive { set { m_usePID = value; } } 2949 public override bool PIDActive { get; set; }
2951 public override float PIDTau { set { m_PIDTau = value; } } 2950 public override float PIDTau { set { m_PIDTau = value; } }
2952 2951
2953 public override float PIDHoverHeight { set { m_PIDHoverHeight = value; ; } } 2952 public override float PIDHoverHeight { set { m_PIDHoverHeight = value; ; } }