(un)eject flag is only lowest bit, only protect active gods from freeze; do not check landing point (telehubs) on eject.

BulletSim2017
UbitUmarov 2017-08-24 01:30:57 +01:00
parent 1ca70232a5
commit 74524cb3be
1 changed files with 3 additions and 3 deletions

View File

@ -2204,12 +2204,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.");
@ -2261,7 +2261,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.");