aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
diff options
context:
space:
mode:
authorDan Lake2011-10-27 02:26:37 -0700
committerDan Lake2011-10-27 02:26:37 -0700
commit272bf712796ad8e98e79aee50311a84deaf23d79 (patch)
treeedda33f1e7478678a457f187768e1b73a118240b /OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
parentContinuation of previous checkin. Found more places where ForEachScenePresenc... (diff)
downloadopensim-SC_OLD-272bf712796ad8e98e79aee50311a84deaf23d79.zip
opensim-SC_OLD-272bf712796ad8e98e79aee50311a84deaf23d79.tar.gz
opensim-SC_OLD-272bf712796ad8e98e79aee50311a84deaf23d79.tar.bz2
opensim-SC_OLD-272bf712796ad8e98e79aee50311a84deaf23d79.tar.xz
Removed use of 'is' operator and casting to find the root ScenePresence in MessageTransfer modules and Groups module.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs11
1 files changed, 5 insertions, 6 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index 630fcab..b2c0f48 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -1076,17 +1076,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1076 // Try root avatar first 1076 // Try root avatar first
1077 foreach (Scene scene in m_sceneList) 1077 foreach (Scene scene in m_sceneList)
1078 { 1078 {
1079 if (scene.Entities.ContainsKey(agentID) && 1079 ScenePresence sp = scene.GetScenePresence(agentID);
1080 scene.Entities[agentID] is ScenePresence) 1080 if (sp != null)
1081 { 1081 {
1082 ScenePresence user = (ScenePresence)scene.Entities[agentID]; 1082 if (!sp.IsChildAgent)
1083 if (!user.IsChildAgent)
1084 { 1083 {
1085 return user.ControllingClient; 1084 return sp.ControllingClient;
1086 } 1085 }
1087 else 1086 else
1088 { 1087 {
1089 child = user.ControllingClient; 1088 child = sp.ControllingClient;
1090 } 1089 }
1091 } 1090 }
1092 } 1091 }