From c693bd51a0eebaf0b4d195a8282c901637672763 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Thu, 24 Nov 2011 22:45:29 +0000 Subject: [PATCH] Remove bizarre call to PhysicsScene.Simulate(0) in Scene.GetNearestAllowedPosition() At least on ODE, this wasn't doing any harm but there wasn't any point to it either --- OpenSim/Region/Framework/Scenes/Scene.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index d76ee1ce03..04eca3302f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4637,9 +4637,6 @@ namespace OpenSim.Region.Framework.Scenes public Vector3? GetNearestAllowedPosition(ScenePresence avatar) { - //simulate to make sure we have pretty up to date positions - PhysicsScene.Simulate(0); - ILandObject nearestParcel = GetNearestAllowedParcel(avatar.UUID, avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); if (nearestParcel != null) @@ -4666,12 +4663,13 @@ namespace OpenSim.Region.Framework.Scenes //Ultimate backup if we have no idea where they are Debug.WriteLine("Have no idea where they are, sending them to: " + avatar.lastKnownAllowedPosition.ToString()); return avatar.lastKnownAllowedPosition; - } //Go to the edge, this happens in teleporting to a region with no available parcels Vector3 nearestRegionEdgePoint = GetNearestRegionEdgePosition(avatar); + //Debug.WriteLine("They are really in a place they don't belong, sending them to: " + nearestRegionEdgePoint.ToString()); + return nearestRegionEdgePoint; }