From e312a0bc902f11f42faecce275d52dc388a1debb Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 20 Aug 2015 14:18:17 +0100 Subject: make it compatible with avn, no point making avn compatible with it --- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Physics/OdePlugin/ODEPrim.cs') diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index f934b8a..218ccda 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -114,6 +114,7 @@ namespace OpenSim.Region.Physics.OdePlugin private float m_PIDTau; private float PID_D = 35f; private float PID_G = 25f; + private bool m_usePID; // KF: These next 7 params apply to llSetHoverHeight(float height, integer water, float tau), // and are for non-VEHICLES only. @@ -1730,7 +1731,7 @@ Console.WriteLine(" JointCreateFixed"); // gravityz multiplier = 1 - m_buoyancy fz = _parent_scene.gravityz * (1.0f - m_buoyancy) * m_mass; - if (PIDActive) + if (m_usePID) { //Console.WriteLine("PID " + Name); // KF - this is for object move? eg. llSetPos() ? @@ -1802,7 +1803,7 @@ Console.WriteLine(" JointCreateFixed"); } // end if (PIDActive) // Hover PID Controller needs to be mutually exlusive to MoveTo PID controller - if (m_useHoverPID && !PIDActive) + if (m_useHoverPID && !m_usePID) { //Console.WriteLine("Hover " + Name); @@ -2874,7 +2875,7 @@ Console.WriteLine(" JointCreateFixed"); // it does make sense to do this for tiny little instabilities with physical prim, however 0.5m/frame is fairly large. // 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 // adding these logical exclusion situations to maintain this where I think it was intended to be. - if (m_throttleUpdates || PIDActive || (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE) || (Amotor != IntPtr.Zero)) + if (m_throttleUpdates || m_usePID || (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE) || (Amotor != IntPtr.Zero)) { m_minvelocity = 0.5f; } @@ -2955,7 +2956,10 @@ Console.WriteLine(" JointCreateFixed"); m_log.WarnFormat("[PHYSICS]: Got NaN PIDTarget from Scene on Object {0}", Name); } } - public override bool PIDActive { get; set; } + // os version + //public override bool PIDActive {get { return m_usePID; } set { m_usePID = value; } } + public override bool PIDActive { set { m_usePID = value; } } + public override float PIDTau { set { m_PIDTau = value; } } public override float PIDHoverHeight { set { m_PIDHoverHeight = value; ; } } @@ -3352,7 +3356,10 @@ Console.WriteLine(" JointCreateFixed"); RequestAssetDelegate assetProvider = _parent_scene.RequestAssetMethod; if (assetProvider != null) assetProvider(_pbs.SculptTexture, MeshAssetReceived); - }, null, "ODEPrim.CheckMeshAsset"); + // os version + //}, null, "ODEPrim.CheckMeshAsset"); + // avn + }); } } -- cgit v1.1