From 8568c6a7c038a8f49b926d44ca5324c741c80c98 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 27 Jan 2011 06:57:54 +0100 Subject: Implement "Cannot teleport closer to destination" message --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 7445f57..5810824 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -4433,7 +4433,11 @@ if (m_animator.m_jumping) force.Z = m_animator.m_jumpVelocity; // add for ju (!m_scene.Permissions.IsGod(m_uuid)) && (!m_scene.RegionInfo.EstateSettings.IsEstateManager(m_uuid))) { - pos = land.LandData.UserLocation; + float curr = Vector3.Distance(AbsolutePosition, pos); + if (Vector3.Distance(land.LandData.UserLocation, pos) < curr) + pos = land.LandData.UserLocation; + else + ControllingClient.SendAlertMessage("Can't teleport closer to destination"); } } } -- cgit v1.1