diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 46 |
1 files changed, 7 insertions, 39 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index f2353b9..47acb0b 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1162,45 +1162,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1162 | 1162 | ||
1163 | m_scene.EventManager.TriggerSetRootAgentScene(m_uuid, m_scene); | 1163 | m_scene.EventManager.TriggerSetRootAgentScene(m_uuid, m_scene); |
1164 | 1164 | ||
1165 | /* this should be done by groups module on TriggerOnMakeRootAgent(this) below | ||
1166 | at least XmlIRpcGroups | ||
1167 | UUID groupUUID = UUID.Zero; | ||
1168 | string GroupName = string.Empty; | ||
1169 | ulong groupPowers = 0; | ||
1170 | 1165 | ||
1171 | |||
1172 | |||
1173 | |||
1174 | // ---------------------------------- | ||
1175 | // Previous Agent Difference - AGNI sends an unsolicited AgentDataUpdate upon root agent status | ||
1176 | try | ||
1177 | { | ||
1178 | |||
1179 | if (gm != null) | ||
1180 | { | ||
1181 | groupUUID = ControllingClient.ActiveGroupId; | ||
1182 | GroupRecord record = gm.GetGroupRecord(groupUUID); | ||
1183 | if (record != null) | ||
1184 | GroupName = record.GroupName; | ||
1185 | GroupMembershipData groupMembershipData = gm.GetMembershipData(groupUUID, m_uuid); | ||
1186 | if (groupMembershipData != null) | ||
1187 | groupPowers = groupMembershipData.GroupPowers; | ||
1188 | } | ||
1189 | ControllingClient.SendAgentDataUpdate(m_uuid, groupUUID, Firstname, Lastname, groupPowers, GroupName, | ||
1190 | Grouptitle); | ||
1191 | } | ||
1192 | catch (Exception e) | ||
1193 | { | ||
1194 | m_log.Debug("[AGENTUPDATE]: " + e.ToString()); | ||
1195 | } | ||
1196 | // ------------------------------------ | ||
1197 | */ | ||
1198 | if (ParentID == 0) | 1166 | if (ParentID == 0) |
1199 | { | 1167 | { |
1200 | // Moved this from SendInitialData to ensure that Appearance is initialized | ||
1201 | // before the inventory is processed in MakeRootAgent. This fixes a race condition | ||
1202 | // related to the handling of attachments | ||
1203 | |||
1204 | if (m_scene.TestBorderCross(pos, Cardinals.E)) | 1168 | if (m_scene.TestBorderCross(pos, Cardinals.E)) |
1205 | { | 1169 | { |
1206 | Border crossedBorder = m_scene.GetCrossedBorder(pos, Cardinals.E); | 1170 | Border crossedBorder = m_scene.GetCrossedBorder(pos, Cardinals.E); |
@@ -1310,11 +1274,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1310 | /// It doesn't get called for a teleport. Reason being, an agent that | 1274 | /// It doesn't get called for a teleport. Reason being, an agent that |
1311 | /// teleports out may not end up anywhere near this region | 1275 | /// teleports out may not end up anywhere near this region |
1312 | /// </remarks> | 1276 | /// </remarks> |
1313 | public void MakeChildAgent() | 1277 | public void MakeChildAgent(ulong newRegionHandle) |
1314 | { | 1278 | { |
1315 | m_scene.EventManager.OnRegionHeartbeatEnd -= RegionHeartbeatEnd; | 1279 | m_scene.EventManager.OnRegionHeartbeatEnd -= RegionHeartbeatEnd; |
1316 | 1280 | ||
1317 | m_log.DebugFormat("[SCENE PRESENCE]: Making {0} a child agent in {1}", Name, Scene.RegionInfo.RegionName); | 1281 | RegionHandle = newRegionHandle; |
1282 | |||
1283 | m_log.DebugFormat("[SCENE PRESENCE]: Making {0} a child agent in {1} from root region {2}", | ||
1284 | Name, Scene.RegionInfo.RegionName, newRegionHandle); | ||
1318 | 1285 | ||
1319 | // Reset the m_originRegionID as it has dual use as a flag to signal that the UpdateAgent() call orignating | 1286 | // Reset the m_originRegionID as it has dual use as a flag to signal that the UpdateAgent() call orignating |
1320 | // from the source simulator has completed on a V2 teleport. | 1287 | // from the source simulator has completed on a V2 teleport. |
@@ -4023,6 +3990,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4023 | 3990 | ||
4024 | } | 3991 | } |
4025 | 3992 | ||
3993 | /* useless. Either use MakeChild or delete the presence | ||
4026 | public void Reset() | 3994 | public void Reset() |
4027 | { | 3995 | { |
4028 | // m_log.DebugFormat("[SCENE PRESENCE]: Resetting {0} in {1}", Name, Scene.RegionInfo.RegionName); | 3996 | // m_log.DebugFormat("[SCENE PRESENCE]: Resetting {0} in {1}", Name, Scene.RegionInfo.RegionName); |
@@ -4033,7 +4001,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4033 | 4001 | ||
4034 | Animator.ResetAnimations(); | 4002 | Animator.ResetAnimations(); |
4035 | } | 4003 | } |
4036 | 4004 | */ | |
4037 | /// <summary> | 4005 | /// <summary> |
4038 | /// Computes which child agents to close when the scene presence moves to another region. | 4006 | /// Computes which child agents to close when the scene presence moves to another region. |
4039 | /// Removes those regions from m_knownRegions. | 4007 | /// Removes those regions from m_knownRegions. |