update ODE binaries for windows. Other platforms need to compile from opensim-libs repo, folder ODE-OpenSim-0.13.2, read file OPENSIM-README.txt. Remove code to reduce bounce on non physical placement, new unmanaged should handle that
parent
9354e60df0
commit
49884b94a7
|
@ -111,7 +111,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
|
|
||||||
private int m_body_autodisable_frames;
|
private int m_body_autodisable_frames;
|
||||||
public int m_bodydisablecontrol = 0;
|
public int m_bodydisablecontrol = 0;
|
||||||
public int m_bodyMoveCoolDown = 0;
|
|
||||||
private float m_gravmod = 1.0f;
|
private float m_gravmod = 1.0f;
|
||||||
|
|
||||||
// Default we're a Geometry
|
// Default we're a Geometry
|
||||||
|
@ -1029,8 +1028,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
|
|
||||||
d.AllocateODEDataForThread(0);
|
d.AllocateODEDataForThread(0);
|
||||||
if(Body != IntPtr.Zero)
|
if(Body != IntPtr.Zero)
|
||||||
{
|
|
||||||
if(m_bodyMoveCoolDown >= 0)
|
|
||||||
{
|
{
|
||||||
d.Vector3 dtmp = d.BodyGetAngularVel(Body);
|
d.Vector3 dtmp = d.BodyGetAngularVel(Body);
|
||||||
m_rotationalVelocity.X = dtmp.X;
|
m_rotationalVelocity.X = dtmp.X;
|
||||||
|
@ -1041,7 +1038,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
_velocity.X = dtmp.X;
|
_velocity.X = dtmp.X;
|
||||||
_velocity.Y = dtmp.Y;
|
_velocity.Y = dtmp.Y;
|
||||||
_velocity.Z = dtmp.Z;
|
_velocity.Z = dtmp.Z;
|
||||||
}
|
|
||||||
d.BodySetLinearVel(Body, 0, 0, 0); // stop it
|
d.BodySetLinearVel(Body, 0, 0, 0); // stop it
|
||||||
d.BodySetAngularVel(Body, 0, 0, 0);
|
d.BodySetAngularVel(Body, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
@ -1345,7 +1342,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
bounce = parent_scene.m_materialContactsData[(int)Material.Wood].bounce;
|
bounce = parent_scene.m_materialContactsData[(int)Material.Wood].bounce;
|
||||||
|
|
||||||
m_building = true; // control must set this to false when done
|
m_building = true; // control must set this to false when done
|
||||||
m_bodyMoveCoolDown = 0;
|
|
||||||
|
|
||||||
AddChange(changes.Add, null);
|
AddChange(changes.Add, null);
|
||||||
|
|
||||||
|
@ -2144,14 +2140,12 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
d.BodySetAngularVel(Body, m_rotationalVelocity.X, m_rotationalVelocity.Y, m_rotationalVelocity.Z);
|
d.BodySetAngularVel(Body, m_rotationalVelocity.X, m_rotationalVelocity.Y, m_rotationalVelocity.Z);
|
||||||
d.BodySetLinearVel(Body, _velocity.X, _velocity.Y, _velocity.Z);
|
d.BodySetLinearVel(Body, _velocity.X, _velocity.Y, _velocity.Z);
|
||||||
*/
|
|
||||||
_zeroFlag = false;
|
_zeroFlag = false;
|
||||||
m_bodydisablecontrol = 0;
|
m_bodydisablecontrol = 0;
|
||||||
}
|
}
|
||||||
m_bodyMoveCoolDown = -5;
|
|
||||||
_parent_scene.addActiveGroups(this);
|
_parent_scene.addActiveGroups(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2244,7 +2238,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
}
|
}
|
||||||
m_mass = primMass;
|
m_mass = primMass;
|
||||||
m_collisionscore = 0;
|
m_collisionscore = 0;
|
||||||
m_bodyMoveCoolDown = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FixInertia(Vector3 NewPos,Quaternion newrot)
|
private void FixInertia(Vector3 NewPos,Quaternion newrot)
|
||||||
|
@ -2907,7 +2900,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
{
|
{
|
||||||
_zeroFlag = true;
|
_zeroFlag = true;
|
||||||
d.BodyEnable(Body);
|
d.BodyEnable(Body);
|
||||||
m_bodyMoveCoolDown = -5;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// else if (_parent != null)
|
// else if (_parent != null)
|
||||||
|
@ -2950,8 +2942,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
{
|
{
|
||||||
d.GeomSetPosition(prim_geom, newPos.X, newPos.Y, newPos.Z);
|
d.GeomSetPosition(prim_geom, newPos.X, newPos.Y, newPos.Z);
|
||||||
_position = newPos;
|
_position = newPos;
|
||||||
if (Body != IntPtr.Zero && !m_disabled)
|
|
||||||
m_bodyMoveCoolDown = -5;
|
|
||||||
}
|
}
|
||||||
if (Body != IntPtr.Zero && !d.BodyIsEnabled(Body))
|
if (Body != IntPtr.Zero && !d.BodyIsEnabled(Body))
|
||||||
{
|
{
|
||||||
|
@ -3016,7 +3006,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
{
|
{
|
||||||
if(m_angularlocks != 0)
|
if(m_angularlocks != 0)
|
||||||
createAMotor(m_angularlocks);
|
createAMotor(m_angularlocks);
|
||||||
m_bodyMoveCoolDown = -5;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Body != IntPtr.Zero && !d.BodyIsEnabled(Body))
|
if (Body != IntPtr.Zero && !d.BodyIsEnabled(Body))
|
||||||
|
@ -3391,8 +3380,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
enableBodySoft();
|
enableBodySoft();
|
||||||
else if (!d.BodyIsEnabled(Body))
|
else if (!d.BodyIsEnabled(Body))
|
||||||
d.BodyEnable(Body);
|
d.BodyEnable(Body);
|
||||||
if(m_bodyMoveCoolDown >= 0)
|
|
||||||
d.BodySetLinearVel(Body, newVel.X, newVel.Y, newVel.Z);
|
|
||||||
}
|
}
|
||||||
//resetCollisionAccounting();
|
//resetCollisionAccounting();
|
||||||
}
|
}
|
||||||
|
@ -3416,9 +3403,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
enableBodySoft();
|
enableBodySoft();
|
||||||
else if (!d.BodyIsEnabled(Body))
|
else if (!d.BodyIsEnabled(Body))
|
||||||
d.BodyEnable(Body);
|
d.BodyEnable(Body);
|
||||||
|
|
||||||
if(m_bodyMoveCoolDown >= 0);
|
|
||||||
d.BodySetAngularVel(Body, newAngVel.X, newAngVel.Y, newAngVel.Z);
|
|
||||||
}
|
}
|
||||||
//resetCollisionAccounting();
|
//resetCollisionAccounting();
|
||||||
}
|
}
|
||||||
|
@ -3569,26 +3553,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
if (!childPrim && m_isphysical && Body != IntPtr.Zero &&
|
if (!childPrim && m_isphysical && Body != IntPtr.Zero &&
|
||||||
!m_disabled && !m_isSelected && !m_building && !m_outbounds)
|
!m_disabled && !m_isSelected && !m_building && !m_outbounds)
|
||||||
{
|
{
|
||||||
if(m_bodyMoveCoolDown < 0)
|
|
||||||
{
|
|
||||||
m_bodyMoveCoolDown++;
|
|
||||||
// if(!IsColliding)
|
|
||||||
// m_bodyCoolDown +=2;
|
|
||||||
if(m_bodyMoveCoolDown >= 0)
|
|
||||||
{
|
|
||||||
d.BodySetAngularVel(Body, m_rotationalVelocity.X, m_rotationalVelocity.Y, m_rotationalVelocity.Z);
|
|
||||||
d.BodySetLinearVel(Body, _velocity.X, _velocity.Y, _velocity.Z);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
d.BodySetAngularVel(Body, 0, 0, 0);
|
|
||||||
d.BodySetLinearVel(Body, 0, 0, 0);
|
|
||||||
m_forceacc = Vector3.Zero;
|
|
||||||
m_angularForceacc = Vector3.Zero;
|
|
||||||
_zeroFlag = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!d.BodyIsEnabled(Body))
|
if (!d.BodyIsEnabled(Body))
|
||||||
{
|
{
|
||||||
// let vehicles sleep
|
// let vehicles sleep
|
||||||
|
@ -3844,8 +3808,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
m_lastposition = _position;
|
m_lastposition = _position;
|
||||||
m_lastorientation = _orientation;
|
m_lastorientation = _orientation;
|
||||||
|
|
||||||
if(m_bodyMoveCoolDown >= 0)
|
|
||||||
{
|
|
||||||
d.Vector3 dtmp = d.BodyGetAngularVel(Body);
|
d.Vector3 dtmp = d.BodyGetAngularVel(Body);
|
||||||
m_rotationalVelocity.X = dtmp.X;
|
m_rotationalVelocity.X = dtmp.X;
|
||||||
m_rotationalVelocity.Y = dtmp.Y;
|
m_rotationalVelocity.Y = dtmp.Y;
|
||||||
|
@ -3855,7 +3817,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
_velocity.X = dtmp.X;
|
_velocity.X = dtmp.X;
|
||||||
_velocity.Y = dtmp.Y;
|
_velocity.Y = dtmp.Y;
|
||||||
_velocity.Z = dtmp.Z;
|
_velocity.Z = dtmp.Z;
|
||||||
}
|
|
||||||
|
|
||||||
d.BodySetLinearVel(Body, 0, 0, 0); // stop it
|
d.BodySetLinearVel(Body, 0, 0, 0); // stop it
|
||||||
d.BodySetAngularVel(Body, 0, 0, 0);
|
d.BodySetAngularVel(Body, 0, 0, 0);
|
||||||
|
@ -3879,8 +3840,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
_zeroFlag = true;
|
_zeroFlag = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
if(m_bodyMoveCoolDown >= 0)
|
|
||||||
{
|
{
|
||||||
float poserror;
|
float poserror;
|
||||||
float angerror;
|
float angerror;
|
||||||
|
@ -3907,7 +3866,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
else
|
else
|
||||||
_zeroFlag = false;
|
_zeroFlag = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// update position
|
// update position
|
||||||
if (!(_zeroFlag && lastZeroFlag))
|
if (!(_zeroFlag && lastZeroFlag))
|
||||||
|
@ -3931,8 +3889,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
m_rotationalVelocity = Vector3.Zero;
|
m_rotationalVelocity = Vector3.Zero;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
if(m_bodyMoveCoolDown >= 0)
|
|
||||||
{
|
{
|
||||||
d.Vector3 vel = d.BodyGetLinearVel(Body);
|
d.Vector3 vel = d.BodyGetLinearVel(Body);
|
||||||
|
|
||||||
|
@ -3976,7 +3932,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
m_rotationalVelocity.Z = vel.Z;
|
m_rotationalVelocity.Z = vel.Z;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (_zeroFlag)
|
if (_zeroFlag)
|
||||||
{
|
{
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue