aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-02-23 22:56:42 +0000
committerJustin Clark-Casey (justincc)2012-02-23 22:56:42 +0000
commit90ea00a1098c918d5eb5a2be2793b109c6622a35 (patch)
tree9c7749d7addeaa21aae6467a1fd016fba3e13986 /OpenSim/Region/Framework/Scenes/Scene.cs
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC_OLD-90ea00a1098c918d5eb5a2be2793b109c6622a35.zip
opensim-SC_OLD-90ea00a1098c918d5eb5a2be2793b109c6622a35.tar.gz
opensim-SC_OLD-90ea00a1098c918d5eb5a2be2793b109c6622a35.tar.bz2
opensim-SC_OLD-90ea00a1098c918d5eb5a2be2793b109c6622a35.tar.xz
Try to resolve some problems with viewers crashing after hitting parcel banlines or freezing on the banline.
This involves 1) On forcible teleport, call m_scene.RequestTeleportLocation() rather than ScenePresence.Teleport() - only EntityTransferModule now should call SP.Teleport() 2) When avatar is being forcibly moved due to banlines, use a 'stop movement' tolerance of 0.2 to requested position rather than 1 This prevents the avatar sometimes being stuck to banlines until they teleport somewhere else. This aims to fix some problems in http://opensimulator.org/mantis/view.php?id=5822
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs17
1 files changed, 12 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 6187803..cf6e6af 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4699,7 +4699,10 @@ namespace OpenSim.Region.Framework.Scenes
4699 Vector3? nearestPoint = GetNearestPointInParcelAlongDirectionFromPoint(avatar.AbsolutePosition, dir, nearestParcel); 4699 Vector3? nearestPoint = GetNearestPointInParcelAlongDirectionFromPoint(avatar.AbsolutePosition, dir, nearestParcel);
4700 if (nearestPoint != null) 4700 if (nearestPoint != null)
4701 { 4701 {
4702 Debug.WriteLine("Found a sane previous position based on velocity, sending them to: " + nearestPoint.ToString()); 4702// m_log.DebugFormat(
4703// "[SCENE]: Found a sane previous position based on velocity for {0}, sending them to {1} in {2}",
4704// avatar.Name, nearestPoint, nearestParcel.LandData.Name);
4705
4703 return nearestPoint.Value; 4706 return nearestPoint.Value;
4704 } 4707 }
4705 4708
@@ -4709,12 +4712,16 @@ namespace OpenSim.Region.Framework.Scenes
4709 nearestPoint = GetNearestPointInParcelAlongDirectionFromPoint(avatar.AbsolutePosition, dir, nearestParcel); 4712 nearestPoint = GetNearestPointInParcelAlongDirectionFromPoint(avatar.AbsolutePosition, dir, nearestParcel);
4710 if (nearestPoint != null) 4713 if (nearestPoint != null)
4711 { 4714 {
4712 Debug.WriteLine("They had a zero velocity, sending them to: " + nearestPoint.ToString()); 4715// m_log.DebugFormat(
4716// "[SCENE]: {0} had a zero velocity, sending them to {1}", avatar.Name, nearestPoint);
4717
4713 return nearestPoint.Value; 4718 return nearestPoint.Value;
4714 } 4719 }
4715 4720
4716 //Ultimate backup if we have no idea where they are 4721 //Ultimate backup if we have no idea where they are
4717 Debug.WriteLine("Have no idea where they are, sending them to: " + avatar.lastKnownAllowedPosition.ToString()); 4722// m_log.DebugFormat(
4723// "[SCENE]: No idea where {0} is, sending them to {1}", avatar.Name, avatar.lastKnownAllowedPosition);
4724
4718 return avatar.lastKnownAllowedPosition; 4725 return avatar.lastKnownAllowedPosition;
4719 } 4726 }
4720 4727
@@ -5120,7 +5127,7 @@ namespace OpenSim.Region.Framework.Scenes
5120// presence.Name, presence.AbsolutePosition, presence.MoveToPositionTarget); 5127// presence.Name, presence.AbsolutePosition, presence.MoveToPositionTarget);
5121 5128
5122 Vector3 agent_control_v3 = new Vector3(); 5129 Vector3 agent_control_v3 = new Vector3();
5123 presence.HandleMoveToTargetUpdate(ref agent_control_v3); 5130 presence.HandleMoveToTargetUpdate(1, ref agent_control_v3);
5124 presence.AddNewMovement(agent_control_v3); 5131 presence.AddNewMovement(agent_control_v3);
5125 } 5132 }
5126 } 5133 }