Merge branch 'master' into httptests

This commit is contained in:
UbitUmarov
2017-08-24 02:18:40 +01:00
5 changed files with 33 additions and 9 deletions

View File

@@ -371,7 +371,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
teleportFlags |= (uint)TeleportFlags.Godlike;
}
if (!sp.Scene.Permissions.CanTeleport(sp.UUID))
else if (!sp.Scene.Permissions.CanTeleport(sp.UUID))
return;
string destinationRegionName = "(not found)";
@@ -391,17 +391,27 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
try
{
// Reset animations; the viewer does that in teleports.
sp.Animator.ResetAnimations();
if (regionHandle == sp.Scene.RegionInfo.RegionHandle)
{
if(!sp.AllowMovement)
{
sp.ControllingClient.SendTeleportFailed("You are frozen");
m_entityTransferStateMachine.ResetFromTransit(sp.UUID);
return;
}
// Reset animations; the viewer does that in teleports.
sp.Animator.ResetAnimations();
destinationRegionName = sp.Scene.RegionInfo.RegionName;
TeleportAgentWithinRegion(sp, position, lookAt, teleportFlags);
}
else // Another region possibly in another simulator
{
// Reset animations; the viewer does that in teleports.
sp.Animator.ResetAnimations();
GridRegion finalDestination = null;
try
{

View File

@@ -2201,12 +2201,12 @@ namespace OpenSim.Region.CoreModules.World.Land
((Scene)client.Scene).TryGetScenePresence(client.AgentId, out parcelManager);
System.Threading.Timer Timer;
if (targetAvatar.GodController.UserLevel == 0)
if (targetAvatar.GodController.UserLevel < 200)
{
ILandObject land = ((Scene)client.Scene).LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y);
if (!((Scene)client.Scene).Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze, true))
return;
if (flags == 0)
if ((flags & 1) == 0) // only lowest bit has meaning for now
{
targetAvatar.AllowMovement = false;
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
Vector3 pos = m_scene.GetNearestAllowedPosition(targetAvatar, land);
targetAvatar.TeleportWithMomentum(pos, null);
targetAvatar.TeleportOnEject(pos);
targetAvatar.ControllingClient.SendAlertMessage("You have been ejected by " + parcelManager.Firstname + " " + parcelManager.Lastname);
parcelManager.ControllingClient.SendAlertMessage("Avatar Ejected.");

View File

@@ -1886,7 +1886,7 @@ namespace OpenSim.Region.CoreModules.World.Land
if (land.LandData.LocalID == LandData.LocalID)
{
Vector3 pos = m_scene.GetNearestAllowedPosition(presence, land);
presence.TeleportWithMomentum(pos, null);
presence.TeleportOnEject(pos);
presence.ControllingClient.SendAlertMessage("You have been ejected from this land");
}
}