Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster
commit
aa613dab1f
|
@ -4923,9 +4923,16 @@ Environment.Exit(1);
|
||||||
return nearestPoint.Value;
|
return nearestPoint.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Ultimate backup if we have no idea where they are
|
ILandObject dest = LandChannel.GetLandObject(avatar.lastKnownAllowedPosition.X, avatar.lastKnownAllowedPosition.Y);
|
||||||
Debug.WriteLine("Have no idea where they are, sending them to: " + avatar.lastKnownAllowedPosition.ToString());
|
if (dest != excludeParcel)
|
||||||
return avatar.lastKnownAllowedPosition;
|
{
|
||||||
|
// Ultimate backup if we have no idea where they are and
|
||||||
|
// the last allowed position was in another parcel
|
||||||
|
Debug.WriteLine("Have no idea where they are, sending them to: " + avatar.lastKnownAllowedPosition.ToString());
|
||||||
|
return avatar.lastKnownAllowedPosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
// else fall through to region edge
|
||||||
}
|
}
|
||||||
|
|
||||||
//Go to the edge, this happens in teleporting to a region with no available parcels
|
//Go to the edge, this happens in teleporting to a region with no available parcels
|
||||||
|
|
|
@ -4641,7 +4641,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
if (UUID.TryParse(agent, out agentId))
|
if (UUID.TryParse(agent, out agentId))
|
||||||
{
|
{
|
||||||
ScenePresence presence = World.GetScenePresence(agentId);
|
ScenePresence presence = World.GetScenePresence(agentId);
|
||||||
if (presence != null)
|
if (presence != null && presence.PresenceType != PresenceType.Npc)
|
||||||
{
|
{
|
||||||
// agent must not be a god
|
// agent must not be a god
|
||||||
if (presence.UserLevel >= 200) return;
|
if (presence.UserLevel >= 200) return;
|
||||||
|
@ -4650,7 +4650,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
if (m_host.OwnerID == World.LandChannel.GetLandObject(
|
if (m_host.OwnerID == World.LandChannel.GetLandObject(
|
||||||
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
|
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
|
||||||
{
|
{
|
||||||
World.TeleportClientHome(agentId, presence.ControllingClient);
|
if (!World.TeleportClientHome(agentId, presence.ControllingClient))
|
||||||
|
{
|
||||||
|
// They can't be teleported home for some reason
|
||||||
|
GridRegion regionInfo = World.GridService.GetRegionByUUID(UUID.Zero, new UUID("2b02daac-e298-42fa-9a75-f488d37896e6"));
|
||||||
|
if (regionInfo != null)
|
||||||
|
{
|
||||||
|
World.RequestTeleportLocation(
|
||||||
|
presence.ControllingClient, regionInfo.RegionHandle, new Vector3(128, 128, 23), Vector3.Zero,
|
||||||
|
(uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4664,7 +4674,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
if (UUID.TryParse(agent, out agentId))
|
if (UUID.TryParse(agent, out agentId))
|
||||||
{
|
{
|
||||||
ScenePresence presence = World.GetScenePresence(agentId);
|
ScenePresence presence = World.GetScenePresence(agentId);
|
||||||
if (presence != null)
|
if (presence != null && presence.PresenceType != PresenceType.Npc)
|
||||||
{
|
{
|
||||||
// agent must not be a god
|
// agent must not be a god
|
||||||
if (presence.UserLevel >= 200) return;
|
if (presence.UserLevel >= 200) return;
|
||||||
|
@ -11658,6 +11668,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
Vector3 rayEnd = new Vector3((float)end.x, (float)end.y, (float)end.z);
|
Vector3 rayEnd = new Vector3((float)end.x, (float)end.y, (float)end.z);
|
||||||
Vector3 dir = rayEnd - rayStart;
|
Vector3 dir = rayEnd - rayStart;
|
||||||
|
|
||||||
|
float dist = Vector3.Mag(dir);
|
||||||
|
|
||||||
int count = 1;
|
int count = 1;
|
||||||
bool detectPhantom = false;
|
bool detectPhantom = false;
|
||||||
int dataFlags = 0;
|
int dataFlags = 0;
|
||||||
|
@ -11714,6 +11726,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
int values = 0;
|
int values = 0;
|
||||||
foreach (ContactResult result in results)
|
foreach (ContactResult result in results)
|
||||||
{
|
{
|
||||||
|
if (result.Depth > dist)
|
||||||
|
continue;
|
||||||
|
|
||||||
UUID itemID = UUID.Zero;
|
UUID itemID = UUID.Zero;
|
||||||
int linkNum = 0;
|
int linkNum = 0;
|
||||||
|
|
||||||
|
|
|
@ -2290,6 +2290,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
string groupTitle = String.Empty;
|
string groupTitle = String.Empty;
|
||||||
|
|
||||||
|
if (!World.Permissions.CanRezObject(1, m_host.OwnerID, new Vector3((float)position.x, (float)position.y, (float)position.z)))
|
||||||
|
return new LSL_Key(UUID.Zero.ToString());
|
||||||
|
|
||||||
if (firstname != String.Empty || lastname != String.Empty)
|
if (firstname != String.Empty || lastname != String.Empty)
|
||||||
{
|
{
|
||||||
if (firstname != "Shown outfit:")
|
if (firstname != "Shown outfit:")
|
||||||
|
@ -2619,8 +2622,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
{
|
{
|
||||||
UUID npcId = new UUID(npc.m_string);
|
UUID npcId = new UUID(npc.m_string);
|
||||||
|
|
||||||
if (!module.CheckPermissions(npcId, m_host.OwnerID))
|
ILandObject l = World.LandChannel.GetLandObject(m_host.GroupPosition.X, m_host.GroupPosition.Y);
|
||||||
return;
|
if (l == null || m_host.OwnerID != l.LandData.OwnerID)
|
||||||
|
{
|
||||||
|
if (!module.CheckPermissions(npcId, m_host.OwnerID))
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
module.DeleteNPC(npcId, World);
|
module.DeleteNPC(npcId, World);
|
||||||
}
|
}
|
||||||
|
|
|
@ -858,7 +858,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||||
ret = Math.Sign(Quaternion.Mag(l) - Quaternion.Mag(r));
|
ret = Math.Sign(Quaternion.Mag(l) - Quaternion.Mag(r));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ascending == 0)
|
if (ascending != 1)
|
||||||
{
|
{
|
||||||
ret = 0 - ret;
|
ret = 0 - ret;
|
||||||
}
|
}
|
||||||
|
@ -891,6 +891,9 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||||
stride = 1;
|
stride = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((Data.Length % stride) != 0)
|
||||||
|
return new list(ret);
|
||||||
|
|
||||||
// we can optimize here in the case where stride == 1 and the list
|
// we can optimize here in the case where stride == 1 and the list
|
||||||
// consists of homogeneous types
|
// consists of homogeneous types
|
||||||
|
|
||||||
|
@ -910,7 +913,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||||
if (homogeneous)
|
if (homogeneous)
|
||||||
{
|
{
|
||||||
Array.Sort(ret, new HomogeneousComparer());
|
Array.Sort(ret, new HomogeneousComparer());
|
||||||
if (ascending == 0)
|
if (ascending != 1)
|
||||||
{
|
{
|
||||||
Array.Reverse(ret);
|
Array.Reverse(ret);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue