Oooops don't hover underground but do hover

avinationmerge
UbitUmarov 2012-04-27 23:18:54 +01:00
parent f5cb403e7e
commit e48fa38ff5
1 changed files with 27 additions and 26 deletions

View File

@ -773,11 +773,13 @@ namespace OpenSim.Region.Physics.OdePlugin
d.Vector3 pos = d.BodyGetPosition(Body); d.Vector3 pos = d.BodyGetPosition(Body);
float t = _pParentScene.GetTerrainHeightAtXY(pos.X, pos.Y); float t = _pParentScene.GetTerrainHeightAtXY(pos.X, pos.Y);
float perr;
if (t < m_VhoverHeight) // don't go underground // default to global but don't go underground
{ if (t < m_VhoverHeight)
// default to global perr = m_VhoverHeight - pos.Z;
float 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)
{ {
@ -806,7 +808,6 @@ namespace OpenSim.Region.Physics.OdePlugin
else // no buoyancy else // no buoyancy
force.Z += _pParentScene.gravityz; force.Z += _pParentScene.gravityz;
} }
}
else else
{ {
// default gravity and Buoyancy // default gravity and Buoyancy