aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs16
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs16
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs2
5 files changed, 33 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index c93c54d..9b094f7 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -371,7 +371,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
371 teleportFlags |= (uint)TeleportFlags.Godlike; 371 teleportFlags |= (uint)TeleportFlags.Godlike;
372 } 372 }
373 373
374 if (!sp.Scene.Permissions.CanTeleport(sp.UUID)) 374 else if (!sp.Scene.Permissions.CanTeleport(sp.UUID))
375 return; 375 return;
376 376
377 string destinationRegionName = "(not found)"; 377 string destinationRegionName = "(not found)";
@@ -391,17 +391,27 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
391 391
392 try 392 try
393 { 393 {
394 // Reset animations; the viewer does that in teleports.
395 sp.Animator.ResetAnimations();
396 394
397 if (regionHandle == sp.Scene.RegionInfo.RegionHandle) 395 if (regionHandle == sp.Scene.RegionInfo.RegionHandle)
398 { 396 {
397 if(!sp.AllowMovement)
398 {
399 sp.ControllingClient.SendTeleportFailed("You are frozen");
400 m_entityTransferStateMachine.ResetFromTransit(sp.UUID);
401 return;
402 }
403
404 // Reset animations; the viewer does that in teleports.
405 sp.Animator.ResetAnimations();
399 destinationRegionName = sp.Scene.RegionInfo.RegionName; 406 destinationRegionName = sp.Scene.RegionInfo.RegionName;
400 407
401 TeleportAgentWithinRegion(sp, position, lookAt, teleportFlags); 408 TeleportAgentWithinRegion(sp, position, lookAt, teleportFlags);
402 } 409 }
403 else // Another region possibly in another simulator 410 else // Another region possibly in another simulator
404 { 411 {
412 // Reset animations; the viewer does that in teleports.
413 sp.Animator.ResetAnimations();
414
405 GridRegion finalDestination = null; 415 GridRegion finalDestination = null;
406 try 416 try
407 { 417 {
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index 760f621..c32de62 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -2201,12 +2201,12 @@ namespace OpenSim.Region.CoreModules.World.Land
2201 ((Scene)client.Scene).TryGetScenePresence(client.AgentId, out parcelManager); 2201 ((Scene)client.Scene).TryGetScenePresence(client.AgentId, out parcelManager);
2202 System.Threading.Timer Timer; 2202 System.Threading.Timer Timer;
2203 2203
2204 if (targetAvatar.GodController.UserLevel == 0) 2204 if (targetAvatar.GodController.UserLevel < 200)
2205 { 2205 {
2206 ILandObject land = ((Scene)client.Scene).LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y); 2206 ILandObject land = ((Scene)client.Scene).LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y);
2207 if (!((Scene)client.Scene).Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze, true)) 2207 if (!((Scene)client.Scene).Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze, true))
2208 return; 2208 return;
2209 if (flags == 0) 2209 if ((flags & 1) == 0) // only lowest bit has meaning for now
2210 { 2210 {
2211 targetAvatar.AllowMovement = false; 2211 targetAvatar.AllowMovement = false;
2212 targetAvatar.ControllingClient.SendAlertMessage(parcelManager.Firstname + " " + parcelManager.Lastname + " has frozen you for 30 seconds. You cannot move or interact with the world."); 2212 targetAvatar.ControllingClient.SendAlertMessage(parcelManager.Firstname + " " + parcelManager.Lastname + " has frozen you for 30 seconds. You cannot move or interact with the world.");
@@ -2258,7 +2258,7 @@ namespace OpenSim.Region.CoreModules.World.Land
2258 2258
2259 Vector3 pos = m_scene.GetNearestAllowedPosition(targetAvatar, land); 2259 Vector3 pos = m_scene.GetNearestAllowedPosition(targetAvatar, land);
2260 2260
2261 targetAvatar.TeleportWithMomentum(pos, null); 2261 targetAvatar.TeleportOnEject(pos);
2262 targetAvatar.ControllingClient.SendAlertMessage("You have been ejected by " + parcelManager.Firstname + " " + parcelManager.Lastname); 2262 targetAvatar.ControllingClient.SendAlertMessage("You have been ejected by " + parcelManager.Firstname + " " + parcelManager.Lastname);
2263 parcelManager.ControllingClient.SendAlertMessage("Avatar Ejected."); 2263 parcelManager.ControllingClient.SendAlertMessage("Avatar Ejected.");
2264 2264
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index 07d11f9..4471432 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -1886,7 +1886,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1886 if (land.LandData.LocalID == LandData.LocalID) 1886 if (land.LandData.LocalID == LandData.LocalID)
1887 { 1887 {
1888 Vector3 pos = m_scene.GetNearestAllowedPosition(presence, land); 1888 Vector3 pos = m_scene.GetNearestAllowedPosition(presence, land);
1889 presence.TeleportWithMomentum(pos, null); 1889 presence.TeleportOnEject(pos);
1890 presence.ControllingClient.SendAlertMessage("You have been ejected from this land"); 1890 presence.ControllingClient.SendAlertMessage("You have been ejected from this land");
1891 } 1891 }
1892 } 1892 }
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index ba3aaae..f9c7031 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1620,7 +1620,7 @@ namespace OpenSim.Region.Framework.Scenes
1620 public void TeleportWithMomentum(Vector3 pos, Vector3? v) 1620 public void TeleportWithMomentum(Vector3 pos, Vector3? v)
1621 { 1621 {
1622 if(!CheckLocalTPLandingPoint(ref pos)) 1622 if(!CheckLocalTPLandingPoint(ref pos))
1623 return; 1623 return;
1624 1624
1625 if (ParentID != (uint)0) 1625 if (ParentID != (uint)0)
1626 StandUp(); 1626 StandUp();
@@ -1642,6 +1642,20 @@ namespace OpenSim.Region.Framework.Scenes
1642 SendTerseUpdateToAllClients(); 1642 SendTerseUpdateToAllClients();
1643 } 1643 }
1644 1644
1645 public void TeleportOnEject(Vector3 pos)
1646 {
1647 if (ParentID != (uint)0)
1648 StandUp();
1649
1650 bool isFlying = Flying;
1651 RemoveFromPhysicalScene();
1652
1653 AbsolutePosition = pos;
1654
1655 AddToPhysicalScene(isFlying);
1656 SendTerseUpdateToAllClients();
1657 }
1658
1645 public void avnLocalTeleport(Vector3 newpos, Vector3? newvel, bool rotateToVelXY) 1659 public void avnLocalTeleport(Vector3 newpos, Vector3? newvel, bool rotateToVelXY)
1646 { 1660 {
1647 if(!CheckLocalTPLandingPoint(ref newpos)) 1661 if(!CheckLocalTPLandingPoint(ref newpos))
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index b810ffb..fa32986 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -6827,7 +6827,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6827 if (m_host.OwnerID == land.LandData.OwnerID) 6827 if (m_host.OwnerID == land.LandData.OwnerID)
6828 { 6828 {
6829 Vector3 p = World.GetNearestAllowedPosition(presence, land); 6829 Vector3 p = World.GetNearestAllowedPosition(presence, land);
6830 presence.TeleportWithMomentum(p, null); 6830 presence.TeleportOnEject(p);
6831 presence.ControllingClient.SendAlertMessage("You have been ejected from this land"); 6831 presence.ControllingClient.SendAlertMessage("You have been ejected from this land");
6832 } 6832 }
6833 } 6833 }