ubOde don't use old ode body sleep option, a few changes on sleep control, update ode.dll (windows, others needed) (keep older versions.. bc.. well bugs happen)

0.9.0-post-fixes
UbitUmarov 2017-07-07 01:49:34 +01:00
parent 1dc56eb15f
commit dfef16297b
5 changed files with 31 additions and 8 deletions

View File

@ -345,6 +345,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
if (rootPrim.Body != IntPtr.Zero && !d.BodyIsEnabled(rootPrim.Body)
&& !rootPrim.m_isSelected && !rootPrim.m_disabled)
d.BodyEnable(rootPrim.Body);
break;
case Vehicle.LINEAR_FRICTION_TIMESCALE:
if (pValue < m_timestep) pValue = m_timestep;

View File

@ -1847,8 +1847,8 @@ namespace OpenSim.Region.PhysicsModule.ubOde
ApplyCollisionCatFlags();
_zeroFlag = true;
d.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
d.BodyEnable(Body);
}
}
resetCollisionAccounting();
@ -2900,6 +2900,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
if (Body != IntPtr.Zero && !m_disabled)
{
_zeroFlag = true;
d.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
d.BodyEnable(Body);
}
}
@ -2933,6 +2934,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
if (!d.BodyIsEnabled(Body))
{
_zeroFlag = true;
d.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
d.BodyEnable(Body);
}
}
@ -2947,6 +2949,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
if (Body != IntPtr.Zero && !d.BodyIsEnabled(Body))
{
_zeroFlag = true;
d.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
d.BodyEnable(Body);
}
}
@ -3012,6 +3015,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
if (Body != IntPtr.Zero && !d.BodyIsEnabled(Body))
{
_zeroFlag = true;
d.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
d.BodyEnable(Body);
}
}
@ -3070,6 +3074,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
if (Body != IntPtr.Zero && !d.BodyIsEnabled(Body))
{
_zeroFlag = true;
d.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
d.BodyEnable(Body);
}
}
@ -3312,8 +3317,10 @@ namespace OpenSim.Region.PhysicsModule.ubOde
if (m_disabled)
enableBodySoft();
else if (!d.BodyIsEnabled(Body))
{
d.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
d.BodyEnable(Body);
}
}
m_torque = newtorque;
}
@ -3323,8 +3330,11 @@ namespace OpenSim.Region.PhysicsModule.ubOde
{
m_force = force;
if (!m_isSelected && !m_outbounds && Body != IntPtr.Zero && !d.BodyIsEnabled(Body))
{
d.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
d.BodyEnable(Body);
}
}
private void changeAddForce(Vector3 theforce)
{
@ -3339,9 +3349,12 @@ namespace OpenSim.Region.PhysicsModule.ubOde
if (m_disabled)
enableBodySoft();
else if (!d.BodyIsEnabled(Body))
{
d.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
d.BodyEnable(Body);
}
}
}
m_collisionscore = 0;
}
}
@ -3359,9 +3372,12 @@ namespace OpenSim.Region.PhysicsModule.ubOde
if (m_disabled)
enableBodySoft();
else if (!d.BodyIsEnabled(Body))
{
d.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
d.BodyEnable(Body);
}
}
}
m_collisionscore = 0;
}
}
@ -3382,7 +3398,10 @@ namespace OpenSim.Region.PhysicsModule.ubOde
if (m_disabled)
enableBodySoft();
else if (!d.BodyIsEnabled(Body))
{
d.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
d.BodyEnable(Body);
}
d.BodySetLinearVel(Body, newVel.X, newVel.Y, newVel.Z);
}
//resetCollisionAccounting();
@ -3406,7 +3425,10 @@ namespace OpenSim.Region.PhysicsModule.ubOde
if (m_disabled)
enableBodySoft();
else if (!d.BodyIsEnabled(Body))
{
d.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
d.BodyEnable(Body);
}
d.BodySetAngularVel(Body, newAngVel.X, newAngVel.Y, newAngVel.Z);
}
//resetCollisionAccounting();
@ -3571,12 +3593,13 @@ namespace OpenSim.Region.PhysicsModule.ubOde
d.BodySetAngularVel(Body,0f,0f,0f);
d.BodySetLinearVel(Body,0f,0f,0f);
_zeroFlag = true;
d.BodySetAutoDisableSteps(Body, 1);
d.BodyEnable(Body);
m_bodydisablecontrol = -4;
}
if(m_bodydisablecontrol < 0)
m_bodydisablecontrol ++;
m_bodydisablecontrol++;
d.Vector3 lpos = d.GeomGetPosition(prim_geom); // root position that is seem by rest of simulator
@ -3741,13 +3764,12 @@ namespace OpenSim.Region.PhysicsModule.ubOde
public void UpdatePositionAndVelocity(int frame)
{
if (_parent == null && !m_disabled && !m_building && !m_outbounds && Body != IntPtr.Zero)
if (_parent == null && !m_isSelected && !m_disabled && !m_building && !m_outbounds && Body != IntPtr.Zero)
{
bool bodyenabled = d.BodyIsEnabled(Body);
if(m_bodydisablecontrol < 0)
return;
bool bodyenabled = d.BodyIsEnabled(Body);
if (bodyenabled || !_zeroFlag)
{
bool lastZeroFlag = _zeroFlag;

View File

@ -481,7 +481,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
contactsPerCollision = physicsconfig.GetInt("contacts_per_collision", contactsPerCollision);
geomDefaultDensity = physicsconfig.GetFloat("geometry_default_density", geomDefaultDensity);
bodyFramesAutoDisable = physicsconfig.GetInt("body_frames_auto_disable", bodyFramesAutoDisable);
// bodyFramesAutoDisable = physicsconfig.GetInt("body_frames_auto_disable", bodyFramesAutoDisable);
physics_logging = physicsconfig.GetBoolean("physics_logging", false);
physics_logging_interval = physicsconfig.GetInt("physics_logging_interval", 0);

Binary file not shown.

Binary file not shown.