make it compatible with avn, no point making avn compatible with it

avinationmerge
UbitUmarov 2015-08-20 14:18:17 +01:00
parent 43a83da5ce
commit e312a0bc90
3 changed files with 30 additions and 6 deletions

View File

@ -1251,7 +1251,8 @@ namespace OpenSim.Region.Physics.OdePlugin
public override Vector3 PIDTarget { set { return; } }
public override bool PIDActive
{
get { return false; }
// os version
// get { return false; }
set { return; }
}
public override float PIDTau { set { return; } }

View File

@ -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
});
}
}

View File

@ -1969,6 +1969,7 @@ namespace OpenSim.Region.Physics.OdePlugin
#region Add/Remove Entities
/* core version
public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 velocity, Vector3 size, bool isFlying)
{
OdeCharacter newAv
@ -1983,6 +1984,21 @@ namespace OpenSim.Region.Physics.OdePlugin
return newAv;
}
*/
public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying)
{
OdeCharacter newAv
= new OdeCharacter(
avName, this, position, Vector3.Zero, size, avPIDD, avPIDP,
avCapRadius, avStandupTensor, avDensity,
avMovementDivisorWalk, avMovementDivisorRun);
newAv.Flying = isFlying;
newAv.MinimumGroundFlightOffset = minimumGroundFlightOffset;
newAv.m_avatarplanted = avplanted;
return newAv;
}
public override void RemoveAvatar(PhysicsActor actor)
{