Implement "Cannot teleport closer to destination" message

avinationmerge
Melanie 2011-01-27 06:57:54 +01:00
parent 1143e022b4
commit 8568c6a7c0
1 changed files with 5 additions and 1 deletions

View File

@ -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.Permissions.IsGod(m_uuid)) &&
(!m_scene.RegionInfo.EstateSettings.IsEstateManager(m_uuid))) (!m_scene.RegionInfo.EstateSettings.IsEstateManager(m_uuid)))
{ {
float curr = Vector3.Distance(AbsolutePosition, pos);
if (Vector3.Distance(land.LandData.UserLocation, pos) < curr)
pos = land.LandData.UserLocation; pos = land.LandData.UserLocation;
else
ControllingClient.SendAlertMessage("Can't teleport closer to destination");
} }
} }
} }