diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 16 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 24 |
2 files changed, 17 insertions, 23 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index e53fd5d..ebe276b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4124,9 +4124,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4124 | m_host.AddScriptLPS(1); | 4124 | m_host.AddScriptLPS(1); |
4125 | List<UUID> keytable = new List<UUID>(); | 4125 | List<UUID> keytable = new List<UUID>(); |
4126 | // parse for sitting avatare-uuids | 4126 | // parse for sitting avatare-uuids |
4127 | World.ForEachScenePresence(delegate(ScenePresence presence) | 4127 | World.ForEachRootScenePresence(delegate(ScenePresence presence) |
4128 | { | 4128 | { |
4129 | if (!presence.IsChildAgent && presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID)) | 4129 | if (presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID)) |
4130 | keytable.Add(presence.UUID); | 4130 | keytable.Add(presence.UUID); |
4131 | }); | 4131 | }); |
4132 | 4132 | ||
@@ -4199,9 +4199,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4199 | m_host.AddScriptLPS(1); | 4199 | m_host.AddScriptLPS(1); |
4200 | // parse for sitting avatare-names | 4200 | // parse for sitting avatare-names |
4201 | List<String> nametable = new List<String>(); | 4201 | List<String> nametable = new List<String>(); |
4202 | World.ForEachScenePresence(delegate(ScenePresence presence) | 4202 | World.ForEachRootScenePresence(delegate(ScenePresence presence) |
4203 | { | 4203 | { |
4204 | if (!presence.IsChildAgent && presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID)) | 4204 | if (presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID)) |
4205 | nametable.Add(presence.ControllingClient.Name); | 4205 | nametable.Add(presence.ControllingClient.Name); |
4206 | }); | 4206 | }); |
4207 | 4207 | ||
@@ -9933,9 +9933,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9933 | landObject.SetMediaUrl(url); | 9933 | landObject.SetMediaUrl(url); |
9934 | 9934 | ||
9935 | // now send to all (non-child) agents in the parcel | 9935 | // now send to all (non-child) agents in the parcel |
9936 | World.ForEachScenePresence(delegate(ScenePresence sp) | 9936 | World.ForEachRootScenePresence(delegate(ScenePresence sp) |
9937 | { | 9937 | { |
9938 | if (!sp.IsChildAgent && (sp.currentParcelUUID == landData.GlobalID)) | 9938 | if (sp.currentParcelUUID == landData.GlobalID) |
9939 | { | 9939 | { |
9940 | sp.ControllingClient.SendParcelMediaUpdate(landData.MediaURL, | 9940 | sp.ControllingClient.SendParcelMediaUpdate(landData.MediaURL, |
9941 | landData.MediaID, | 9941 | landData.MediaID, |
@@ -9966,9 +9966,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9966 | if (presence == null) | 9966 | if (presence == null) |
9967 | { | 9967 | { |
9968 | // send to all (non-child) agents in the parcel | 9968 | // send to all (non-child) agents in the parcel |
9969 | World.ForEachScenePresence(delegate(ScenePresence sp) | 9969 | World.ForEachRootScenePresence(delegate(ScenePresence sp) |
9970 | { | 9970 | { |
9971 | if (!sp.IsChildAgent && (sp.currentParcelUUID == landData.GlobalID)) | 9971 | if (sp.currentParcelUUID == landData.GlobalID) |
9972 | { | 9972 | { |
9973 | sp.ControllingClient.SendParcelMediaCommand(0x4, // TODO what is this? | 9973 | sp.ControllingClient.SendParcelMediaCommand(0x4, // TODO what is this? |
9974 | (ParcelMediaCommandEnum)commandToSend, | 9974 | (ParcelMediaCommandEnum)commandToSend, |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index ab0eec9..dc22017 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -882,10 +882,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
882 | CheckThreatLevel(ThreatLevel.None, "osGetAgents"); | 882 | CheckThreatLevel(ThreatLevel.None, "osGetAgents"); |
883 | 883 | ||
884 | LSL_List result = new LSL_List(); | 884 | LSL_List result = new LSL_List(); |
885 | World.ForEachScenePresence(delegate(ScenePresence sp) | 885 | World.ForEachRootScenePresence(delegate(ScenePresence sp) |
886 | { | 886 | { |
887 | if (!sp.IsChildAgent) | 887 | result.Add(new LSL_String(sp.Name)); |
888 | result.Add(new LSL_String(sp.Name)); | ||
889 | }); | 888 | }); |
890 | return result; | 889 | return result; |
891 | } | 890 | } |
@@ -2590,11 +2589,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2590 | CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); | 2589 | CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); |
2591 | if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID)) | 2590 | if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID)) |
2592 | { | 2591 | { |
2593 | World.ForEachScenePresence(delegate(ScenePresence sp) | 2592 | World.ForEachRootScenePresence(delegate(ScenePresence sp) |
2594 | { | 2593 | { |
2595 | if (!sp.IsChildAgent && | 2594 | if (sp.Firstname == FirstName && sp.Lastname == SurName) |
2596 | sp.Firstname == FirstName && | ||
2597 | sp.Lastname == SurName) | ||
2598 | { | 2595 | { |
2599 | // kick client... | 2596 | // kick client... |
2600 | if (alert != null) | 2597 | if (alert != null) |
@@ -2726,17 +2723,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2726 | CheckThreatLevel(ThreatLevel.None, "osGetAvatarList"); | 2723 | CheckThreatLevel(ThreatLevel.None, "osGetAvatarList"); |
2727 | 2724 | ||
2728 | LSL_List result = new LSL_List(); | 2725 | LSL_List result = new LSL_List(); |
2729 | World.ForEachScenePresence(delegate (ScenePresence avatar) | 2726 | World.ForEachRootScenePresence(delegate (ScenePresence avatar) |
2730 | { | 2727 | { |
2731 | if (avatar != null && avatar.UUID != m_host.OwnerID) | 2728 | if (avatar != null && avatar.UUID != m_host.OwnerID) |
2732 | { | 2729 | { |
2733 | if (avatar.IsChildAgent == false) | 2730 | result.Add(new LSL_String(avatar.UUID.ToString())); |
2734 | { | 2731 | OpenMetaverse.Vector3 ap = avatar.AbsolutePosition; |
2735 | result.Add(new LSL_String(avatar.UUID.ToString())); | 2732 | result.Add(new LSL_Vector(ap.X, ap.Y, ap.Z)); |
2736 | OpenMetaverse.Vector3 ap = avatar.AbsolutePosition; | 2733 | result.Add(new LSL_String(avatar.Name)); |
2737 | result.Add(new LSL_Vector(ap.X, ap.Y, ap.Z)); | ||
2738 | result.Add(new LSL_String(avatar.Name)); | ||
2739 | } | ||
2740 | } | 2734 | } |
2741 | }); | 2735 | }); |
2742 | 2736 | ||