Improved sitted avatars crossings ( plus tests on vehicles)
parent
8ef2a2b7de
commit
a135e51d23
|
@ -634,7 +634,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
ScenePresence agent = icon.EndInvoke(iar);
|
ScenePresence agent = icon.EndInvoke(iar);
|
||||||
|
|
||||||
//// If the cross was successful, this agent is a child agent
|
//// If the cross was successful, this agent is a child agent
|
||||||
//if (agent.IsChildAgent)
|
if (agent.IsChildAgent)
|
||||||
|
{
|
||||||
|
if (agent.ParentUUID != UUID.Zero)
|
||||||
|
{
|
||||||
|
agent.ParentPart = null;
|
||||||
|
agent.ParentPosition = Vector3.Zero;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// agent.Reset();
|
// agent.Reset();
|
||||||
// else // Not successful
|
// else // Not successful
|
||||||
// agent.RestoreInCurrentScene();
|
// agent.RestoreInCurrentScene();
|
||||||
|
|
|
@ -793,10 +793,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
float perr;
|
float perr;
|
||||||
|
|
||||||
// default to global but don't go underground
|
// default to global but don't go underground
|
||||||
if (t < m_VhoverHeight)
|
|
||||||
perr = m_VhoverHeight - pos.Z;
|
perr = m_VhoverHeight - pos.Z;
|
||||||
else
|
|
||||||
perr = t - pos.Z; ;
|
|
||||||
|
|
||||||
if ((m_flags & VehicleFlag.HOVER_GLOBAL_HEIGHT) == 0)
|
if ((m_flags & VehicleFlag.HOVER_GLOBAL_HEIGHT) == 0)
|
||||||
{
|
{
|
||||||
|
@ -817,9 +814,13 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
perr += w;
|
perr += w;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (t > m_VhoverHeight)
|
||||||
|
perr = t - pos.Z; ;
|
||||||
|
|
||||||
if ((m_flags & VehicleFlag.HOVER_UP_ONLY) == 0 || perr > 0)
|
if ((m_flags & VehicleFlag.HOVER_UP_ONLY) == 0 || perr > 0)
|
||||||
{
|
{
|
||||||
force.Z += (perr / m_VhoverTimescale / m_VhoverTimescale - curVel.Z * m_VhoverEfficiency) / m_timestep;
|
// force.Z += (perr / m_VhoverTimescale / m_VhoverTimescale - curVel.Z * m_VhoverEfficiency) / m_timestep;
|
||||||
|
force.Z += (perr / m_VhoverTimescale - curVel.Z * m_VhoverEfficiency);// * m_invtimestep);
|
||||||
force.Z += _pParentScene.gravityz * (1f - m_VehicleBuoyancy);
|
force.Z += _pParentScene.gravityz * (1f - m_VehicleBuoyancy);
|
||||||
}
|
}
|
||||||
else // no buoyancy
|
else // no buoyancy
|
||||||
|
|
Loading…
Reference in New Issue