aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
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/Implementation/LSL_Api.cs
parentremove the pointless check of the face texture struct against null in Bot.Obj... (diff)
downloadopensim-SC-94dc7d07ebc22ce0e0d9b77e91538ddc90799bee.zip
opensim-SC-94dc7d07ebc22ce0e0d9b77e91538ddc90799bee.tar.gz
opensim-SC-94dc7d07ebc22ce0e0d9b77e91538ddc90799bee.tar.bz2
opensim-SC-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/Implementation/LSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs19
1 files changed, 9 insertions, 10 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 {