aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs16
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODEDynamics.cs11
2 files changed, 18 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index dce20c1..42b6bc5 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -634,10 +634,18 @@ namespace OpenSim.Region.Framework.Scenes
634 ScenePresence agent = icon.EndInvoke(iar); 634 ScenePresence agent = icon.EndInvoke(iar);
635 635
636 //// If the cross was successful, this agent is a child agent 636 //// If the cross was successful, this agent is a child agent
637 //if (agent.IsChildAgent) 637 if (agent.IsChildAgent)
638 // agent.Reset(); 638 {
639 //else // Not successful 639 if (agent.ParentUUID != UUID.Zero)
640 // agent.RestoreInCurrentScene(); 640 {
641 agent.ParentPart = null;
642 agent.ParentPosition = Vector3.Zero;
643 }
644 }
645
646// agent.Reset();
647// else // Not successful
648// agent.RestoreInCurrentScene();
641 649
642 // In any case 650 // In any case
643 agent.IsInTransit = false; 651 agent.IsInTransit = false;
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