aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2015-11-20 19:40:04 +0000
committerUbitUmarov2015-11-20 19:40:04 +0000
commit019d057563e741833463cadd2beccdfe79d19ebe (patch)
treed5d9686e3bd58f2bc0c09ce7a2b364a04c1fbce6
parent stop a Vehicle on a failed region cross (or empty border) (old ode) (diff)
downloadopensim-SC-019d057563e741833463cadd2beccdfe79d19ebe.zip
opensim-SC-019d057563e741833463cadd2beccdfe79d19ebe.tar.gz
opensim-SC-019d057563e741833463cadd2beccdfe79d19ebe.tar.bz2
opensim-SC-019d057563e741833463cadd2beccdfe79d19ebe.tar.xz
stop the Vehicle AFTER fixing position not before, bc stop code also updates position (old ode)
-rw-r--r--OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs11
1 files changed, 5 insertions, 6 deletions
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs
index a31110b..ac082cb 100644
--- a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs
@@ -2676,18 +2676,17 @@ Console.WriteLine(" JointCreateFixed");
2676 2676
2677 m_lastVelocity = _velocity; 2677 m_lastVelocity = _velocity;
2678 2678
2679
2680
2681 if(m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE)
2682 m_vehicle.Stop();
2683
2684 if (Body != IntPtr.Zero) 2679 if (Body != IntPtr.Zero)
2685 { 2680 {
2686 d.BodySetLinearVel(Body, 0, 0, 0); // stop it 2681 d.BodySetLinearVel(Body, 0, 0, 0); // stop it
2687 d.BodySetPosition(Body, _position.X, _position.Y, _position.Z); 2682 d.BodySetPosition(Body, _position.X, _position.Y, _position.Z);
2688 enableBodySoft();
2689 } 2683 }
2690 2684
2685 if(m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE)
2686 m_vehicle.Stop(); // this also updates vehicle last position from the body position
2687
2688 enableBodySoft();
2689
2691 outofBounds = false; 2690 outofBounds = false;
2692 base.RequestPhysicsterseUpdate(); 2691 base.RequestPhysicsterseUpdate();
2693 2692