aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorMelanie2011-10-27 18:14:38 +0100
committerMelanie2011-10-27 18:14:38 +0100
commitb975cbcbed71b12898052395fbc83a5880273190 (patch)
treef149288740af5227a865783a51f566bef537721e /OpenSim/Region/ScriptEngine
parentMerge branch 'master' into bigmerge (diff)
parentRemoved use of 'is' operator and casting to find the root ScenePresence in Me... (diff)
downloadopensim-SC_OLD-b975cbcbed71b12898052395fbc83a5880273190.zip
opensim-SC_OLD-b975cbcbed71b12898052395fbc83a5880273190.tar.gz
opensim-SC_OLD-b975cbcbed71b12898052395fbc83a5880273190.tar.bz2
opensim-SC_OLD-b975cbcbed71b12898052395fbc83a5880273190.tar.xz
Merge branch 'master' into bigmerge
Conflicts: OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs16
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs24
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs5
3 files changed, 21 insertions, 24 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
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 3ebeb75..402377d 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -442,7 +442,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
442 IScriptInstance instance = GetInstance(itemId); 442 IScriptInstance instance = GetInstance(itemId);
443 if (instance == null) 443 if (instance == null)
444 { 444 {
445 MainConsole.Instance.OutputFormat("Error - No item found with id {0}", itemId); 445 // Commented out for now since this will cause false reports on simulators with more than
446 // one scene where the current command line set region is 'root' (which causes commands to
447 // go to both regions... (sigh)
448// MainConsole.Instance.OutputFormat("Error - No item found with id {0}", itemId);
446 return; 449 return;
447 } 450 }
448 else 451 else