diff options
author | Justin Clark-Casey (justincc) | 2011-10-28 23:16:46 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-10-28 23:16:46 +0100 |
commit | 0fe756e42c23dabf3b754f3675597aaf6fb627c4 (patch) | |
tree | aa9ebe244f7efe03b8e8cbf80a70b6fb34a6dade /OpenSim/Region/ScriptEngine/Shared/Api | |
parent | fetch SOP.RotationOffset once in UpdateRotation() and compare rather than fet... (diff) | |
parent | Removed use of 'is' operator and casting to find the root ScenePresence in Me... (diff) | |
download | opensim-SC_OLD-0fe756e42c23dabf3b754f3675597aaf6fb627c4.zip opensim-SC_OLD-0fe756e42c23dabf3b754f3675597aaf6fb627c4.tar.gz opensim-SC_OLD-0fe756e42c23dabf3b754f3675597aaf6fb627c4.tar.bz2 opensim-SC_OLD-0fe756e42c23dabf3b754f3675597aaf6fb627c4.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 20 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 24 |
2 files changed, 19 insertions, 25 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 82701ce..83c3b78 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3723,9 +3723,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3723 | m_host.AddScriptLPS(1); | 3723 | m_host.AddScriptLPS(1); |
3724 | List<UUID> keytable = new List<UUID>(); | 3724 | List<UUID> keytable = new List<UUID>(); |
3725 | // parse for sitting avatare-uuids | 3725 | // parse for sitting avatare-uuids |
3726 | World.ForEachScenePresence(delegate(ScenePresence presence) | 3726 | World.ForEachRootScenePresence(delegate(ScenePresence presence) |
3727 | { | 3727 | { |
3728 | if (!presence.IsChildAgent && presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID)) | 3728 | if (presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID)) |
3729 | keytable.Add(presence.UUID); | 3729 | keytable.Add(presence.UUID); |
3730 | }); | 3730 | }); |
3731 | 3731 | ||
@@ -3785,9 +3785,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3785 | m_host.AddScriptLPS(1); | 3785 | m_host.AddScriptLPS(1); |
3786 | // parse for sitting avatare-names | 3786 | // parse for sitting avatare-names |
3787 | List<String> nametable = new List<String>(); | 3787 | List<String> nametable = new List<String>(); |
3788 | World.ForEachScenePresence(delegate(ScenePresence presence) | 3788 | World.ForEachRootScenePresence(delegate(ScenePresence presence) |
3789 | { | 3789 | { |
3790 | if (!presence.IsChildAgent && presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID)) | 3790 | if (presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID)) |
3791 | nametable.Add(presence.ControllingClient.Name); | 3791 | nametable.Add(presence.ControllingClient.Name); |
3792 | }); | 3792 | }); |
3793 | 3793 | ||
@@ -7568,9 +7568,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7568 | { | 7568 | { |
7569 | m_host.AddScriptLPS(1); | 7569 | m_host.AddScriptLPS(1); |
7570 | int avatarCount = 0; | 7570 | int avatarCount = 0; |
7571 | World.ForEachScenePresence(delegate(ScenePresence presence) | 7571 | World.ForEachRootScenePresence(delegate(ScenePresence presence) |
7572 | { | 7572 | { |
7573 | if (!presence.IsChildAgent && presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID)) | 7573 | if (presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID)) |
7574 | avatarCount++; | 7574 | avatarCount++; |
7575 | }); | 7575 | }); |
7576 | 7576 | ||
@@ -9336,9 +9336,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9336 | landObject.SetMediaUrl(url); | 9336 | landObject.SetMediaUrl(url); |
9337 | 9337 | ||
9338 | // now send to all (non-child) agents in the parcel | 9338 | // now send to all (non-child) agents in the parcel |
9339 | World.ForEachScenePresence(delegate(ScenePresence sp) | 9339 | World.ForEachRootScenePresence(delegate(ScenePresence sp) |
9340 | { | 9340 | { |
9341 | if (!sp.IsChildAgent && (sp.currentParcelUUID == landData.GlobalID)) | 9341 | if (sp.currentParcelUUID == landData.GlobalID) |
9342 | { | 9342 | { |
9343 | sp.ControllingClient.SendParcelMediaUpdate(landData.MediaURL, | 9343 | sp.ControllingClient.SendParcelMediaUpdate(landData.MediaURL, |
9344 | landData.MediaID, | 9344 | landData.MediaID, |
@@ -9369,9 +9369,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9369 | if (presence == null) | 9369 | if (presence == null) |
9370 | { | 9370 | { |
9371 | // send to all (non-child) agents in the parcel | 9371 | // send to all (non-child) agents in the parcel |
9372 | World.ForEachScenePresence(delegate(ScenePresence sp) | 9372 | World.ForEachRootScenePresence(delegate(ScenePresence sp) |
9373 | { | 9373 | { |
9374 | if (!sp.IsChildAgent && (sp.currentParcelUUID == landData.GlobalID)) | 9374 | if (sp.currentParcelUUID == landData.GlobalID) |
9375 | { | 9375 | { |
9376 | sp.ControllingClient.SendParcelMediaCommand(0x4, // TODO what is this? | 9376 | sp.ControllingClient.SendParcelMediaCommand(0x4, // TODO what is this? |
9377 | (ParcelMediaCommandEnum)commandToSend, | 9377 | (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 3cfc3c9..654f168 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -873,10 +873,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
873 | CheckThreatLevel(ThreatLevel.None, "osGetAgents"); | 873 | CheckThreatLevel(ThreatLevel.None, "osGetAgents"); |
874 | 874 | ||
875 | LSL_List result = new LSL_List(); | 875 | LSL_List result = new LSL_List(); |
876 | World.ForEachScenePresence(delegate(ScenePresence sp) | 876 | World.ForEachRootScenePresence(delegate(ScenePresence sp) |
877 | { | 877 | { |
878 | if (!sp.IsChildAgent) | 878 | result.Add(new LSL_String(sp.Name)); |
879 | result.Add(new LSL_String(sp.Name)); | ||
880 | }); | 879 | }); |
881 | return result; | 880 | return result; |
882 | } | 881 | } |
@@ -2582,11 +2581,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2582 | CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); | 2581 | CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); |
2583 | if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID)) | 2582 | if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID)) |
2584 | { | 2583 | { |
2585 | World.ForEachScenePresence(delegate(ScenePresence sp) | 2584 | World.ForEachRootScenePresence(delegate(ScenePresence sp) |
2586 | { | 2585 | { |
2587 | if (!sp.IsChildAgent && | 2586 | if (sp.Firstname == FirstName && sp.Lastname == SurName) |
2588 | sp.Firstname == FirstName && | ||
2589 | sp.Lastname == SurName) | ||
2590 | { | 2587 | { |
2591 | // kick client... | 2588 | // kick client... |
2592 | if (alert != null) | 2589 | if (alert != null) |
@@ -2718,17 +2715,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2718 | CheckThreatLevel(ThreatLevel.None, "osGetAvatarList"); | 2715 | CheckThreatLevel(ThreatLevel.None, "osGetAvatarList"); |
2719 | 2716 | ||
2720 | LSL_List result = new LSL_List(); | 2717 | LSL_List result = new LSL_List(); |
2721 | World.ForEachScenePresence(delegate (ScenePresence avatar) | 2718 | World.ForEachRootScenePresence(delegate (ScenePresence avatar) |
2722 | { | 2719 | { |
2723 | if (avatar != null && avatar.UUID != m_host.OwnerID) | 2720 | if (avatar != null && avatar.UUID != m_host.OwnerID) |
2724 | { | 2721 | { |
2725 | if (avatar.IsChildAgent == false) | 2722 | result.Add(new LSL_String(avatar.UUID.ToString())); |
2726 | { | 2723 | OpenMetaverse.Vector3 ap = avatar.AbsolutePosition; |
2727 | result.Add(new LSL_String(avatar.UUID.ToString())); | 2724 | result.Add(new LSL_Vector(ap.X, ap.Y, ap.Z)); |
2728 | OpenMetaverse.Vector3 ap = avatar.AbsolutePosition; | 2725 | result.Add(new LSL_String(avatar.Name)); |
2729 | result.Add(new LSL_Vector(ap.X, ap.Y, ap.Z)); | ||
2730 | result.Add(new LSL_String(avatar.Name)); | ||
2731 | } | ||
2732 | } | 2726 | } |
2733 | }); | 2727 | }); |
2734 | 2728 | ||