aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
authorMelanie2012-05-03 00:15:45 +0200
committerMelanie2012-05-03 00:15:45 +0200
commit8b1cc0dd29156cb3d10c66bfcb097fb7f9aa9f59 (patch)
tree04fb4bfde802563c412a137499e1d936f26bb874 /OpenSim/Region/Physics
parentMerge branch 'master' into careminster (diff)
parent Improved sitted avatars crossings ( plus tests on vehicles) (diff)
downloadopensim-SC-8b1cc0dd29156cb3d10c66bfcb097fb7f9aa9f59.zip
opensim-SC-8b1cc0dd29156cb3d10c66bfcb097fb7f9aa9f59.tar.gz
opensim-SC-8b1cc0dd29156cb3d10c66bfcb097fb7f9aa9f59.tar.bz2
opensim-SC-8b1cc0dd29156cb3d10c66bfcb097fb7f9aa9f59.tar.xz
Merge branch 'avination'
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODEDynamics.cs11
1 files changed, 6 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEDynamics.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODEDynamics.cs
index 7b232c1..9fefc4e 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/ODEDynamics.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/ODEDynamics.cs
@@ -793,10 +793,7 @@ namespace OpenSim.Region.Physics.OdePlugin
793 float perr; 793 float perr;
794 794
795 // default to global but don't go underground 795 // default to global but don't go underground
796 if (t < m_VhoverHeight) 796 perr = m_VhoverHeight - pos.Z;
797 perr = m_VhoverHeight - pos.Z;
798 else
799 perr = t - pos.Z; ;
800 797
801 if ((m_flags & VehicleFlag.HOVER_GLOBAL_HEIGHT) == 0) 798 if ((m_flags & VehicleFlag.HOVER_GLOBAL_HEIGHT) == 0)
802 { 799 {
@@ -817,9 +814,13 @@ namespace OpenSim.Region.Physics.OdePlugin
817 perr += w; 814 perr += w;
818 } 815 }
819 } 816 }
817 else if (t > m_VhoverHeight)
818 perr = t - pos.Z; ;
819
820 if ((m_flags & VehicleFlag.HOVER_UP_ONLY) == 0 || perr > 0) 820 if ((m_flags & VehicleFlag.HOVER_UP_ONLY) == 0 || perr > 0)
821 { 821 {
822 force.Z += (perr / m_VhoverTimescale / m_VhoverTimescale - curVel.Z * m_VhoverEfficiency) / m_timestep; 822 // force.Z += (perr / m_VhoverTimescale / m_VhoverTimescale - curVel.Z * m_VhoverEfficiency) / m_timestep;
823 force.Z += (perr / m_VhoverTimescale - curVel.Z * m_VhoverEfficiency);// * m_invtimestep);
823 force.Z += _pParentScene.gravityz * (1f - m_VehicleBuoyancy); 824 force.Z += _pParentScene.gravityz * (1f - m_VehicleBuoyancy);
824 } 825 }
825 else // no buoyancy 826 else // no buoyancy