From b35a10e2be2b1ef5ddfb4a5541dd139046f23a62 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 13 Dec 2017 01:10:21 +0000 Subject: [PATCH 1/3] mantis 8250: try to work around timing issues --- .../Region/Framework/Scenes/ScenePresence.cs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 018c2e2c53..6bce406ce8 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2587,10 +2587,10 @@ namespace OpenSim.Region.Framework.Scenes } bool update_movementflag = false; - + bool mvToTarget = MovingToTarget; if (agentData.UseClientAgentPosition) { - MovingToTarget = (agentData.ClientAgentPosition - AbsolutePosition).Length() > 0.2f; + MovingToTarget = (agentData.ClientAgentPosition - AbsolutePosition).LengthSquared() > 0.04f; MoveToPositionTarget = agentData.ClientAgentPosition; } @@ -2604,6 +2604,8 @@ namespace OpenSim.Region.Framework.Scenes newFlying = true; else if (FlyDisabled) newFlying = false; + else if(mvToTarget) + newFlying = actor.Flying; else newFlying = ((flags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); @@ -3071,24 +3073,25 @@ namespace OpenSim.Region.Framework.Scenes // "[SCENE PRESENCE]: Avatar {0} set move to target {1} (terrain height {2}) in {3}", // Name, pos, terrainHeight, m_scene.RegionInfo.RegionName); + bool shouldfly = Flying; if (noFly) - Flying = false; + shouldfly = false; else if (pos.Z > terrainHeight || Flying) - Flying = true; + shouldfly = true; LandAtTarget = landAtTarget; MovingToTarget = true; MoveToPositionTarget = pos; + Flying = shouldfly; // Rotate presence around the z-axis to point in same direction as movement. // Ignore z component of vector Vector3 localVectorToTarget3D = pos - AbsolutePosition; - Vector3 localVectorToTarget2D = new Vector3((float)(localVectorToTarget3D.X), (float)(localVectorToTarget3D.Y), 0f); -// m_log.DebugFormat("[SCENE PRESENCE]: Local vector to target is {0}", localVectorToTarget2D); +// m_log.DebugFormat("[SCENE PRESENCE]: Local vector to target is {0},[1}", localVectorToTarget3D.X,localVectorToTarget3D.Y); // Calculate the yaw. - Vector3 angle = new Vector3(0, 0, (float)(Math.Atan2(localVectorToTarget2D.Y, localVectorToTarget2D.X))); + Vector3 angle = new Vector3(0, 0, (float)(Math.Atan2(localVectorToTarget3D.Y, localVectorToTarget3D.X))); // m_log.DebugFormat("[SCENE PRESENCE]: Angle is {0}", angle); From 17b79cec913172bc0c6d02aab2bc4ebd2ad5e244 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 13 Dec 2017 02:14:51 +0000 Subject: [PATCH 2/3] mantis 8255 update example_web.xml --- share/RegionLoading/example_web.xml | 34 ++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/share/RegionLoading/example_web.xml b/share/RegionLoading/example_web.xml index f7ed25e3b0..39e8023e11 100644 --- a/share/RegionLoading/example_web.xml +++ b/share/RegionLoading/example_web.xml @@ -1,8 +1,26 @@ - - - - - - - - \ No newline at end of file + +
+ + + + + + + + + + +
+
+ + + + + + + + + + +
+
\ No newline at end of file From 201c916670f9cd84347005523017049fb4275125 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 14 Dec 2017 05:36:15 +0000 Subject: [PATCH 3/3] add a missing return on a mesh decode error in ubOdemeshmerizer --- OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs index a2a3f79276..032d4ed421 100644 --- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs +++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs @@ -340,7 +340,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing faces = new List(); OSD meshOsd = null; - if (primShape.SculptData.Length <= 0) + if (primShape.SculptData == null || primShape.SculptData.Length <= 0) { // m_log.InfoFormat("[MESH]: asset data for {0} is zero length", primName); return false; @@ -363,6 +363,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing catch (Exception e) { m_log.Error("[MESH]: Exception deserializing mesh asset header:" + e.ToString()); + return false; } start = data.Position;