From 47252214354cb768ecddb50062d650d22f7d1c4f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 18 Feb 2011 20:54:00 +0000 Subject: Stop the avatar sometimes pausing for more than a second on the border when region crossing. This restores a RemoveFromPhysicalScene() call in ScenePresence.CheckForBorderCrossing() when the agent has been placed in transit. If we don't remove the agent from the physical scene, then the method continues to be called via ScenePresence.Update() until the handover of the client between regions is completed. Since this handover can take more than 1000ms (due to the 1000ms event queue polling response from the server), this results in the avatar pausing on the border for the entire handover period. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index cd70de8..4150f4a 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2776,6 +2776,13 @@ namespace OpenSim.Region.Framework.Scenes } else { + // We must remove the agent from the physical scene if it has been placed in transit. If we don't, + // then this method continues to be called from ScenePresence.Update() until the handover of the client between + // regions is completed. Since this handover can take more than 1000ms (due to the 1000ms + // event queue polling response from the server), this results in the avatar pausing on the border + // for the handover period. + RemoveFromPhysicalScene(); + // This constant has been inferred from experimentation // I'm not sure what this value should be, so I tried a few values. timeStep = 0.04f; -- cgit v1.1