diff options
author | Justin Clarke Casey | 2008-05-14 21:09:41 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-05-14 21:09:41 +0000 |
commit | 587f6ab6459d12a9c6fe02dcf272d954b545d099 (patch) | |
tree | bc67cec592a8ceed816761aa2fb3990f3d021e8d /OpenSim/Region | |
parent | *SVN Executable on HttpServer.dll (diff) | |
download | opensim-SC_OLD-587f6ab6459d12a9c6fe02dcf272d954b545d099.zip opensim-SC_OLD-587f6ab6459d12a9c6fe02dcf272d954b545d099.tar.gz opensim-SC_OLD-587f6ab6459d12a9c6fe02dcf272d954b545d099.tar.bz2 opensim-SC_OLD-587f6ab6459d12a9c6fe02dcf272d954b545d099.tar.xz |
* Refactor: Remove SceneObjectGroup.GetScenePresences() in favour of a direct call to Scene
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/EntityBase.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 11 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 12 |
4 files changed, 13 insertions, 20 deletions
diff --git a/OpenSim/Region/Environment/Scenes/EntityBase.cs b/OpenSim/Region/Environment/Scenes/EntityBase.cs index 11bafb7..18a2851 100644 --- a/OpenSim/Region/Environment/Scenes/EntityBase.cs +++ b/OpenSim/Region/Environment/Scenes/EntityBase.cs | |||
@@ -35,13 +35,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
35 | { | 35 | { |
36 | [Serializable] | 36 | [Serializable] |
37 | public abstract class EntityBase : ISerializable | 37 | public abstract class EntityBase : ISerializable |
38 | { | 38 | { |
39 | protected Scene m_scene; | 39 | /// <summary> |
40 | 40 | /// The scene to which this entity belongs | |
41 | /// </summary> | ||
41 | public Scene Scene | 42 | public Scene Scene |
42 | { | 43 | { |
43 | get { return m_scene; } | 44 | get { return m_scene; } |
44 | } | 45 | } |
46 | protected Scene m_scene; | ||
45 | 47 | ||
46 | protected LLUUID m_uuid; | 48 | protected LLUUID m_uuid; |
47 | 49 | ||
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index d017c50..4188deb 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -3096,7 +3096,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3096 | } | 3096 | } |
3097 | 3097 | ||
3098 | /// <summary> | 3098 | /// <summary> |
3099 | /// Request a List of all ScenePresences in this region | 3099 | /// Request a List of all ScenePresences in this region. This returns child agents as well as root agents. |
3100 | /// </summary> | 3100 | /// </summary> |
3101 | /// <returns></returns> | 3101 | /// <returns></returns> |
3102 | public List<ScenePresence> GetScenePresences() | 3102 | public List<ScenePresence> GetScenePresences() |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index bc99aa4..4a112ae 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -785,15 +785,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
785 | part.ClearUndoState(); | 785 | part.ClearUndoState(); |
786 | } | 786 | } |
787 | 787 | ||
788 | /// <summary> | ||
789 | /// | ||
790 | /// </summary> | ||
791 | /// <returns></returns> | ||
792 | public List<ScenePresence> GetScenePresences() | ||
793 | { | ||
794 | return m_scene.GetScenePresences(); | ||
795 | } | ||
796 | |||
797 | public override void UpdateMovement() | 788 | public override void UpdateMovement() |
798 | { | 789 | { |
799 | lock (m_parts) | 790 | lock (m_parts) |
@@ -933,7 +924,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
933 | { | 924 | { |
934 | foreach (SceneObjectPart part in m_parts.Values) | 925 | foreach (SceneObjectPart part in m_parts.Values) |
935 | { | 926 | { |
936 | List<ScenePresence> avatars = GetScenePresences(); | 927 | List<ScenePresence> avatars = Scene.GetScenePresences(); |
937 | for (int i = 0; i < avatars.Count; i++) | 928 | for (int i = 0; i < avatars.Count; i++) |
938 | { | 929 | { |
939 | if (avatars[i].ParentID == LocalId) | 930 | if (avatars[i].ParentID == LocalId) |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 6c5a68d..c171e78 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -2247,7 +2247,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2247 | 2247 | ||
2248 | private void SendObjectPropertiesToClient(LLUUID AgentID) | 2248 | private void SendObjectPropertiesToClient(LLUUID AgentID) |
2249 | { | 2249 | { |
2250 | List<ScenePresence> avatars = m_parentGroup.GetScenePresences(); | 2250 | List<ScenePresence> avatars = m_parentGroup.Scene.GetScenePresences(); |
2251 | for (int i = 0; i < avatars.Count; i++) | 2251 | for (int i = 0; i < avatars.Count; i++) |
2252 | { | 2252 | { |
2253 | // Ugly reference :( | 2253 | // Ugly reference :( |
@@ -2277,7 +2277,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2277 | /// </summary> | 2277 | /// </summary> |
2278 | public void AddFullUpdateToAllAvatars() | 2278 | public void AddFullUpdateToAllAvatars() |
2279 | { | 2279 | { |
2280 | List<ScenePresence> avatars = m_parentGroup.GetScenePresences(); | 2280 | List<ScenePresence> avatars = m_parentGroup.Scene.GetScenePresences(); |
2281 | for (int i = 0; i < avatars.Count; i++) | 2281 | for (int i = 0; i < avatars.Count; i++) |
2282 | { | 2282 | { |
2283 | avatars[i].QueuePartForUpdate(this); | 2283 | avatars[i].QueuePartForUpdate(this); |
@@ -2286,7 +2286,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2286 | 2286 | ||
2287 | public void SendFullUpdateToAllClientsExcept(LLUUID agentID) | 2287 | public void SendFullUpdateToAllClientsExcept(LLUUID agentID) |
2288 | { | 2288 | { |
2289 | List<ScenePresence> avatars = m_parentGroup.GetScenePresences(); | 2289 | List<ScenePresence> avatars = m_parentGroup.Scene.GetScenePresences(); |
2290 | for (int i = 0; i < avatars.Count; i++) | 2290 | for (int i = 0; i < avatars.Count; i++) |
2291 | { | 2291 | { |
2292 | // Ugly reference :( | 2292 | // Ugly reference :( |
@@ -2309,7 +2309,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2309 | /// </summary> | 2309 | /// </summary> |
2310 | public void SendFullUpdateToAllClients() | 2310 | public void SendFullUpdateToAllClients() |
2311 | { | 2311 | { |
2312 | List<ScenePresence> avatars = m_parentGroup.GetScenePresences(); | 2312 | List<ScenePresence> avatars = m_parentGroup.Scene.GetScenePresences(); |
2313 | for (int i = 0; i < avatars.Count; i++) | 2313 | for (int i = 0; i < avatars.Count; i++) |
2314 | { | 2314 | { |
2315 | // Ugly reference :( | 2315 | // Ugly reference :( |
@@ -2370,7 +2370,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2370 | /// Terse updates | 2370 | /// Terse updates |
2371 | public void AddTerseUpdateToAllAvatars() | 2371 | public void AddTerseUpdateToAllAvatars() |
2372 | { | 2372 | { |
2373 | List<ScenePresence> avatars = m_parentGroup.GetScenePresences(); | 2373 | List<ScenePresence> avatars = m_parentGroup.Scene.GetScenePresences(); |
2374 | for (int i = 0; i < avatars.Count; i++) | 2374 | for (int i = 0; i < avatars.Count; i++) |
2375 | { | 2375 | { |
2376 | avatars[i].QueuePartForUpdate(this); | 2376 | avatars[i].QueuePartForUpdate(this); |
@@ -2387,7 +2387,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2387 | /// </summary> | 2387 | /// </summary> |
2388 | public void SendTerseUpdateToAllClients() | 2388 | public void SendTerseUpdateToAllClients() |
2389 | { | 2389 | { |
2390 | List<ScenePresence> avatars = m_parentGroup.GetScenePresences(); | 2390 | List<ScenePresence> avatars = m_parentGroup.Scene.GetScenePresences(); |
2391 | for (int i = 0; i < avatars.Count; i++) | 2391 | for (int i = 0; i < avatars.Count; i++) |
2392 | { | 2392 | { |
2393 | m_parentGroup.SendPartTerseUpdate(avatars[i].ControllingClient, this); | 2393 | m_parentGroup.SendPartTerseUpdate(avatars[i].ControllingClient, this); |