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
0.7.2-post-fixes
Justin Clark-Casey (justincc) 2011-11-24 22:45:29 +00:00
parent 808ace0696
commit c693bd51a0
1 changed files with 2 additions and 4 deletions

View File

@ -4637,9 +4637,6 @@ namespace OpenSim.Region.Framework.Scenes
public Vector3? GetNearestAllowedPosition(ScenePresence avatar) 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); ILandObject nearestParcel = GetNearestAllowedParcel(avatar.UUID, avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
if (nearestParcel != null) if (nearestParcel != null)
@ -4666,12 +4663,13 @@ namespace OpenSim.Region.Framework.Scenes
//Ultimate backup if we have no idea where they are //Ultimate backup if we have no idea where they are
Debug.WriteLine("Have no idea where they are, sending them to: " + avatar.lastKnownAllowedPosition.ToString()); Debug.WriteLine("Have no idea where they are, sending them to: " + avatar.lastKnownAllowedPosition.ToString());
return avatar.lastKnownAllowedPosition; return avatar.lastKnownAllowedPosition;
} }
//Go to the edge, this happens in teleporting to a region with no available parcels //Go to the edge, this happens in teleporting to a region with no available parcels
Vector3 nearestRegionEdgePoint = GetNearestRegionEdgePosition(avatar); Vector3 nearestRegionEdgePoint = GetNearestRegionEdgePosition(avatar);
//Debug.WriteLine("They are really in a place they don't belong, sending them to: " + nearestRegionEdgePoint.ToString()); //Debug.WriteLine("They are really in a place they don't belong, sending them to: " + nearestRegionEdgePoint.ToString());
return nearestRegionEdgePoint; return nearestRegionEdgePoint;
} }