aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorDan Lake2011-11-03 17:06:08 -0700
committerDan Lake2011-11-03 17:06:08 -0700
commit94dc7d07ebc22ce0e0d9b77e91538ddc90799bee (patch)
tree0d2ffc74fa937af0ca5d9e6fb2fafeac2c37dd61 /OpenSim/Region/ScriptEngine/Shared/Api
parentremove the pointless check of the face texture struct against null in Bot.Obj... (diff)
downloadopensim-SC_OLD-94dc7d07ebc22ce0e0d9b77e91538ddc90799bee.zip
opensim-SC_OLD-94dc7d07ebc22ce0e0d9b77e91538ddc90799bee.tar.gz
opensim-SC_OLD-94dc7d07ebc22ce0e0d9b77e91538ddc90799bee.tar.bz2
opensim-SC_OLD-94dc7d07ebc22ce0e0d9b77e91538ddc90799bee.tar.xz
Renamed ForEachRootScenePresence to ForEachAvatar. Cleaned up calls to
the 3 iteration functions so more of them are using the correct iteration for the action they are performing. The 3 iterators that seem to fit all actions within OpenSim at this time are: ForEachAvatar: Perform an action on all avatars (root presences) ForEachClient: Perform an action on all clients (root or child clients) ForEachRootClient: Perform an action on all clients that have an avatar There are still a dozen places or so calling the old ForEachScenePresence that will take a little more refactoring to eliminate.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs19
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs4
3 files changed, 14 insertions, 15 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 0750579..d2ddcef 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1644,7 +1644,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1644 if (flexi) 1644 if (flexi)
1645 { 1645 {
1646 part.Shape.FlexiEntry = true; // this setting flexi true isn't working, but the below parameters do 1646 part.Shape.FlexiEntry = true; // this setting flexi true isn't working, but the below parameters do
1647 // work once the prim is already flexi 1647 // work once the prim is already flexi
1648 part.Shape.FlexiSoftness = softness; 1648 part.Shape.FlexiSoftness = softness;
1649 part.Shape.FlexiGravity = gravity; 1649 part.Shape.FlexiGravity = gravity;
1650 part.Shape.FlexiDrag = friction; 1650 part.Shape.FlexiDrag = friction;
@@ -1654,10 +1654,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1654 part.Shape.FlexiForceY = (float)Force.y; 1654 part.Shape.FlexiForceY = (float)Force.y;
1655 part.Shape.FlexiForceZ = (float)Force.z; 1655 part.Shape.FlexiForceZ = (float)Force.z;
1656 part.Shape.PathCurve = 0x80; 1656 part.Shape.PathCurve = 0x80;
1657 part.ParentGroup.HasGroupChanged = true;
1658 part.ScheduleFullUpdate();
1657 } 1659 }
1658
1659 part.ParentGroup.HasGroupChanged = true;
1660 part.ScheduleFullUpdate();
1661 } 1660 }
1662 1661
1663 /// <summary> 1662 /// <summary>
@@ -3741,7 +3740,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3741 m_host.AddScriptLPS(1); 3740 m_host.AddScriptLPS(1);
3742 List<UUID> keytable = new List<UUID>(); 3741 List<UUID> keytable = new List<UUID>();
3743 // parse for sitting avatare-uuids 3742 // parse for sitting avatare-uuids
3744 World.ForEachRootScenePresence(delegate(ScenePresence presence) 3743 World.ForEachAvatar(delegate(ScenePresence presence)
3745 { 3744 {
3746 if (presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID)) 3745 if (presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID))
3747 keytable.Add(presence.UUID); 3746 keytable.Add(presence.UUID);
@@ -3803,7 +3802,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3803 m_host.AddScriptLPS(1); 3802 m_host.AddScriptLPS(1);
3804 // parse for sitting avatare-names 3803 // parse for sitting avatare-names
3805 List<String> nametable = new List<String>(); 3804 List<String> nametable = new List<String>();
3806 World.ForEachRootScenePresence(delegate(ScenePresence presence) 3805 World.ForEachAvatar(delegate(ScenePresence presence)
3807 { 3806 {
3808 if (presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID)) 3807 if (presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID))
3809 nametable.Add(presence.ControllingClient.Name); 3808 nametable.Add(presence.ControllingClient.Name);
@@ -7612,7 +7611,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7612 { 7611 {
7613 m_host.AddScriptLPS(1); 7612 m_host.AddScriptLPS(1);
7614 int avatarCount = 0; 7613 int avatarCount = 0;
7615 World.ForEachRootScenePresence(delegate(ScenePresence presence) 7614 World.ForEachAvatar(delegate(ScenePresence presence)
7616 { 7615 {
7617 if (presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID)) 7616 if (presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID))
7618 avatarCount++; 7617 avatarCount++;
@@ -9380,7 +9379,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9380 landObject.SetMediaUrl(url); 9379 landObject.SetMediaUrl(url);
9381 9380
9382 // now send to all (non-child) agents in the parcel 9381 // now send to all (non-child) agents in the parcel
9383 World.ForEachRootScenePresence(delegate(ScenePresence sp) 9382 World.ForEachAvatar(delegate(ScenePresence sp)
9384 { 9383 {
9385 if (sp.currentParcelUUID == landData.GlobalID) 9384 if (sp.currentParcelUUID == landData.GlobalID)
9386 { 9385 {
@@ -9413,7 +9412,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9413 if (presence == null) 9412 if (presence == null)
9414 { 9413 {
9415 // send to all (non-child) agents in the parcel 9414 // send to all (non-child) agents in the parcel
9416 World.ForEachRootScenePresence(delegate(ScenePresence sp) 9415 World.ForEachAvatar(delegate(ScenePresence sp)
9417 { 9416 {
9418 if (sp.currentParcelUUID == landData.GlobalID) 9417 if (sp.currentParcelUUID == landData.GlobalID)
9419 { 9418 {
@@ -10528,7 +10527,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10528 10527
10529 if (checkAgents) 10528 if (checkAgents)
10530 { 10529 {
10531 World.ForEachScenePresence(delegate(ScenePresence sp) 10530 World.ForEachAvatar(delegate(ScenePresence sp)
10532 { 10531 {
10533 if (sp.AbsolutePosition.ApproxEquals(posToCheck, sp.PhysicsActor.Size.X)) 10532 if (sp.AbsolutePosition.ApproxEquals(posToCheck, sp.PhysicsActor.Size.X))
10534 { 10533 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index f3206ac..3138131 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -873,7 +873,7 @@ 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.ForEachRootScenePresence(delegate(ScenePresence sp) 876 World.ForEachAvatar(delegate(ScenePresence sp)
877 { 877 {
878 result.Add(new LSL_String(sp.Name)); 878 result.Add(new LSL_String(sp.Name));
879 }); 879 });
@@ -2581,7 +2581,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2581 CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); 2581 CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar");
2582 if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID)) 2582 if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID))
2583 { 2583 {
2584 World.ForEachRootScenePresence(delegate(ScenePresence sp) 2584 World.ForEachAvatar(delegate(ScenePresence sp)
2585 { 2585 {
2586 if (sp.Firstname == FirstName && sp.Lastname == SurName) 2586 if (sp.Firstname == FirstName && sp.Lastname == SurName)
2587 { 2587 {
@@ -2715,7 +2715,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2715 CheckThreatLevel(ThreatLevel.None, "osGetAvatarList"); 2715 CheckThreatLevel(ThreatLevel.None, "osGetAvatarList");
2716 2716
2717 LSL_List result = new LSL_List(); 2717 LSL_List result = new LSL_List();
2718 World.ForEachRootScenePresence(delegate (ScenePresence avatar) 2718 World.ForEachAvatar(delegate (ScenePresence avatar)
2719 { 2719 {
2720 if (avatar != null && avatar.UUID != m_host.OwnerID) 2720 if (avatar != null && avatar.UUID != m_host.OwnerID)
2721 { 2721 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
index 4ac7f8b..eb05f16 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
@@ -507,7 +507,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
507 senseEntity(sp); 507 senseEntity(sp);
508 if ((ts.type & AGENT_BY_USERNAME) != 0) 508 if ((ts.type & AGENT_BY_USERNAME) != 0)
509 { 509 {
510 m_CmdManager.m_ScriptEngine.World.ForEachScenePresence( 510 m_CmdManager.m_ScriptEngine.World.ForEachAvatar(
511 delegate (ScenePresence ssp) 511 delegate (ScenePresence ssp)
512 { 512 {
513 if (ssp.Lastname == "Resident") 513 if (ssp.Lastname == "Resident")
@@ -526,7 +526,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
526 } 526 }
527 else 527 else
528 { 528 {
529 m_CmdManager.m_ScriptEngine.World.ForEachScenePresence(senseEntity); 529 m_CmdManager.m_ScriptEngine.World.ForEachAvatar(senseEntity);
530 } 530 }
531 return sensedEntities; 531 return sensedEntities;
532 } 532 }