diff options
author | Dan Lake | 2011-11-03 17:06:08 -0700 |
---|---|---|
committer | Dan Lake | 2011-11-03 17:06:08 -0700 |
commit | 94dc7d07ebc22ce0e0d9b77e91538ddc90799bee (patch) | |
tree | 0d2ffc74fa937af0ca5d9e6fb2fafeac2c37dd61 /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |
parent | remove the pointless check of the face texture struct against null in Bot.Obj... (diff) | |
download | opensim-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 '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 44f822c..1a709e9 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -992,7 +992,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
992 | public PrimitiveBaseShape Shape | 992 | public PrimitiveBaseShape Shape |
993 | { | 993 | { |
994 | get { return m_shape; } | 994 | get { return m_shape; } |
995 | set { m_shape = value; } | 995 | set { m_shape = value;} |
996 | } | 996 | } |
997 | 997 | ||
998 | /// <summary> | 998 | /// <summary> |
@@ -1336,12 +1336,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
1336 | /// <param name="AgentID"></param> | 1336 | /// <param name="AgentID"></param> |
1337 | private void SendRootPartPropertiesToClient(UUID AgentID) | 1337 | private void SendRootPartPropertiesToClient(UUID AgentID) |
1338 | { | 1338 | { |
1339 | m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) | 1339 | m_parentGroup.Scene.ForEachClient(delegate(IClientAPI client) |
1340 | { | 1340 | { |
1341 | // Ugly reference :( | 1341 | // Ugly reference :( |
1342 | if (avatar.UUID == AgentID) | 1342 | if (client.AgentId == AgentID) |
1343 | { | 1343 | { |
1344 | m_parentGroup.SendPropertiesToClient(avatar.ControllingClient); | 1344 | m_parentGroup.SendPropertiesToClient(client); |
1345 | } | 1345 | } |
1346 | }); | 1346 | }); |
1347 | } | 1347 | } |
@@ -1461,9 +1461,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1461 | if (volume < 0) | 1461 | if (volume < 0) |
1462 | volume = 0; | 1462 | volume = 0; |
1463 | 1463 | ||
1464 | m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence sp) | 1464 | m_parentGroup.Scene.ForEachRootClient(delegate(IClientAPI client) |
1465 | { | 1465 | { |
1466 | sp.ControllingClient.SendAttachedSoundGainChange(UUID, (float)volume); | 1466 | client.SendAttachedSoundGainChange(UUID, (float)volume); |
1467 | }); | 1467 | }); |
1468 | } | 1468 | } |
1469 | 1469 | ||
@@ -2216,7 +2216,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2216 | } | 2216 | } |
2217 | else | 2217 | else |
2218 | { | 2218 | { |
2219 | m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence av) | 2219 | m_parentGroup.Scene.ForEachAvatar(delegate(ScenePresence av) |
2220 | { | 2220 | { |
2221 | if (av.LocalId == localId) | 2221 | if (av.LocalId == localId) |
2222 | { | 2222 | { |
@@ -2347,7 +2347,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2347 | } | 2347 | } |
2348 | else | 2348 | else |
2349 | { | 2349 | { |
2350 | m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence av) | 2350 | m_parentGroup.Scene.ForEachAvatar(delegate(ScenePresence av) |
2351 | { | 2351 | { |
2352 | if (av.LocalId == localId) | 2352 | if (av.LocalId == localId) |
2353 | { | 2353 | { |
@@ -2470,7 +2470,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2470 | } | 2470 | } |
2471 | else | 2471 | else |
2472 | { | 2472 | { |
2473 | m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence av) | 2473 | m_parentGroup.Scene.ForEachAvatar(delegate(ScenePresence av) |
2474 | { | 2474 | { |
2475 | if (av.LocalId == localId) | 2475 | if (av.LocalId == localId) |
2476 | { | 2476 | { |
@@ -2696,7 +2696,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2696 | } | 2696 | } |
2697 | } | 2697 | } |
2698 | 2698 | ||
2699 | m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence sp) | 2699 | m_parentGroup.Scene.ForEachAvatar(delegate(ScenePresence sp) |
2700 | { | 2700 | { |
2701 | if (!(Util.GetDistanceTo(sp.AbsolutePosition, AbsolutePosition) >= 100)) | 2701 | if (!(Util.GetDistanceTo(sp.AbsolutePosition, AbsolutePosition) >= 100)) |
2702 | sp.ControllingClient.SendPreLoadSound(objectID, objectID, soundID); | 2702 | sp.ControllingClient.SendPreLoadSound(objectID, objectID, soundID); |