From 0ffda7128e67a217bb494355d454ff0bd62e6bb5 Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Sat, 21 Nov 2009 04:33:34 -0500 Subject: * Fixes one of two terse update issues. There's still one left, but this one fixes the situation where the object on the server is moving but no updates are being sent. --- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index fa42023..16f2d5d 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -2643,7 +2643,7 @@ Console.WriteLine(" JointCreateFixed"); //outofBounds = true; } -// float Adiff = 1.0f - Math.Abs(Quaternion.Dot(m_lastorientation, l_orientation)); + //float Adiff = 1.0f - Math.Abs(Quaternion.Dot(m_lastorientation, l_orientation)); //Console.WriteLine("Adiff " + m_primName + " = " + Adiff); if ((Math.Abs(m_lastposition.X - l_position.X) < 0.02) && (Math.Abs(m_lastposition.Y - l_position.Y) < 0.02) @@ -2659,6 +2659,8 @@ Console.WriteLine(" JointCreateFixed"); { //m_log.Debug(Math.Abs(m_lastposition.X - l_position.X).ToString()); _zeroFlag = false; + m_lastUpdateSent = false; + //m_throttleUpdates = false; } if (_zeroFlag) @@ -2685,7 +2687,9 @@ Console.WriteLine(" JointCreateFixed"); m_rotationalVelocity = pv; if (_parent == null) + { base.RequestPhysicsterseUpdate(); + } m_lastUpdateSent = true; } @@ -2695,7 +2699,9 @@ Console.WriteLine(" JointCreateFixed"); if (lastZeroFlag != _zeroFlag) { if (_parent == null) + { base.RequestPhysicsterseUpdate(); + } } m_lastVelocity = _velocity; @@ -2728,7 +2734,9 @@ Console.WriteLine(" JointCreateFixed"); if (!m_throttleUpdates || throttleCounter > _parent_scene.geomUpdatesPerThrottledUpdate) { if (_parent == null) + { base.RequestPhysicsterseUpdate(); + } } else { -- cgit v1.1 From 7760da1a4cb5bbccd218c90e311b41b8897f3e05 Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Sat, 21 Nov 2009 04:39:41 -0500 Subject: * Fixes the second of two terse update issues. Physical objects should react normally again. --- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 16f2d5d..6f14f7b 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -2357,6 +2357,9 @@ Console.WriteLine(" JointCreateFixed"); { // Averate previous velocity with the new one so // client object interpolation works a 'little' better + if (_zeroFlag) + return Vector3.Zero; + Vector3 returnVelocity = Vector3.Zero; returnVelocity.X = (m_lastVelocity.X + _velocity.X)/2; returnVelocity.Y = (m_lastVelocity.Y + _velocity.Y)/2; -- cgit v1.1