diff options
author | Melanie | 2013-07-18 10:08:10 +0100 |
---|---|---|
committer | Melanie | 2013-07-18 10:08:10 +0100 |
commit | 7830cc995471120892a24a39e86283774fa07c4c (patch) | |
tree | d3f46b4f3ce95bb8572511c6f12c9f8ca86922c8 /OpenSim/Region/Framework/Scenes/ScenePresence.cs | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Document obscure Groups config related to the user level required for creatin... (diff) | |
download | opensim-SC-7830cc995471120892a24a39e86283774fa07c4c.zip opensim-SC-7830cc995471120892a24a39e86283774fa07c4c.tar.gz opensim-SC-7830cc995471120892a24a39e86283774fa07c4c.tar.bz2 opensim-SC-7830cc995471120892a24a39e86283774fa07c4c.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs
OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs
OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
OpenSim/Region/Framework/Scenes/Scene.cs
OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
OpenSim/Region/Framework/Scenes/ScenePresence.cs
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
OpenSim/Services/HypergridService/UserAgentService.cs
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 4ae0eb1..6e4ac98 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1151,9 +1151,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1151 | 1151 | ||
1152 | MovementFlag = 0; | 1152 | MovementFlag = 0; |
1153 | 1153 | ||
1154 | m_scene.EventManager.TriggerOnMakeRootAgent(this); | 1154 | // DIVA NOTE: I moved TriggerOnMakeRootAgent out of here and into the end of |
1155 | 1155 | // CompleteMovement. We don't want modules doing heavy computation before CompleteMovement | |
1156 | m_scene.EventManager.OnRegionHeartbeatEnd += RegionHeartbeatEnd; | 1156 | // is over. |
1157 | } | 1157 | } |
1158 | 1158 | ||
1159 | public int GetStateSource() | 1159 | public int GetStateSource() |
@@ -1519,10 +1519,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
1519 | bool flying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); | 1519 | bool flying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); |
1520 | MakeRootAgent(AbsolutePosition, flying); | 1520 | MakeRootAgent(AbsolutePosition, flying); |
1521 | ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look); | 1521 | ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look); |
1522 | // Remember in HandleUseCircuitCode, we delayed this to here | ||
1523 | // This will also send the initial data to clients when TP to a neighboring region. | ||
1524 | // Not ideal, but until we know we're TP-ing from a neighboring region, there's not much we can do | ||
1525 | if (m_teleportFlags > 0) | ||
1526 | SendInitialDataToMe(); | ||
1522 | 1527 | ||
1523 | // m_log.DebugFormat("[SCENE PRESENCE] Completed movement"); | 1528 | // m_log.DebugFormat("[SCENE PRESENCE] Completed movement"); |
1524 | 1529 | ||
1525 | if ((m_callbackURI != null) && !m_callbackURI.Equals("")) | 1530 | if (!string.IsNullOrEmpty(m_callbackURI)) |
1526 | { | 1531 | { |
1527 | // We cannot sleep here since this would hold up the inbound packet processing thread, as | 1532 | // We cannot sleep here since this would hold up the inbound packet processing thread, as |
1528 | // CompleteMovement() is executed synchronously. However, it might be better to delay the release | 1533 | // CompleteMovement() is executed synchronously. However, it might be better to delay the release |
@@ -1550,9 +1555,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1550 | // Create child agents in neighbouring regions | 1555 | // Create child agents in neighbouring regions |
1551 | if (openChildAgents && !IsChildAgent) | 1556 | if (openChildAgents && !IsChildAgent) |
1552 | { | 1557 | { |
1553 | // Remember in HandleUseCircuitCode, we delayed this to here | ||
1554 | SendInitialDataToMe(); | ||
1555 | |||
1556 | IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); | 1558 | IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); |
1557 | if (m_agentTransfer != null) | 1559 | if (m_agentTransfer != null) |
1558 | m_agentTransfer.EnableChildAgents(this); | 1560 | m_agentTransfer.EnableChildAgents(this); |
@@ -1575,6 +1577,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1575 | // m_log.DebugFormat( | 1577 | // m_log.DebugFormat( |
1576 | // "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms", | 1578 | // "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms", |
1577 | // client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); | 1579 | // client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); |
1580 | |||
1581 | // DIVA NOTE: moved this here from MakeRoot. We don't want modules making heavy | ||
1582 | // computations before CompleteMovement is over | ||
1583 | m_scene.EventManager.TriggerOnMakeRootAgent(this); | ||
1584 | |||
1578 | } | 1585 | } |
1579 | 1586 | ||
1580 | /// <summary> | 1587 | /// <summary> |
@@ -2886,11 +2893,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2886 | SendOtherAgentsAppearanceToMe(); | 2893 | SendOtherAgentsAppearanceToMe(); |
2887 | 2894 | ||
2888 | EntityBase[] entities = Scene.Entities.GetEntities(); | 2895 | EntityBase[] entities = Scene.Entities.GetEntities(); |
2889 | foreach(EntityBase e in entities) | 2896 | foreach (EntityBase e in entities) |
2890 | { | 2897 | { |
2891 | if (e != null && e is SceneObjectGroup) | 2898 | if (e != null && e is SceneObjectGroup) |
2892 | ((SceneObjectGroup)e).SendFullUpdateToClient(ControllingClient); | 2899 | ((SceneObjectGroup)e).SendFullUpdateToClient(ControllingClient); |
2893 | } | 2900 | } |
2901 | |||
2894 | }); | 2902 | }); |
2895 | } | 2903 | } |
2896 | 2904 | ||
@@ -3116,7 +3124,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3116 | cadu.Velocity = Velocity; | 3124 | cadu.Velocity = Velocity; |
3117 | 3125 | ||
3118 | AgentPosition agentpos = new AgentPosition(); | 3126 | AgentPosition agentpos = new AgentPosition(); |
3119 | agentpos.CopyFrom(cadu); | 3127 | agentpos.CopyFrom(cadu, ControllingClient.SessionId); |
3120 | 3128 | ||
3121 | // Let's get this out of the update loop | 3129 | // Let's get this out of the update loop |
3122 | Util.FireAndForget(delegate { m_scene.SendOutChildAgentUpdates(agentpos, this); }); | 3130 | Util.FireAndForget(delegate { m_scene.SendOutChildAgentUpdates(agentpos, this); }); |
@@ -3355,7 +3363,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
3355 | { | 3363 | { |
3356 | m_log.Debug("[SCENE PRESENCE]: Closing " + byebyeRegions.Count + " child agents"); | 3364 | m_log.Debug("[SCENE PRESENCE]: Closing " + byebyeRegions.Count + " child agents"); |
3357 | 3365 | ||
3358 | m_scene.SceneGridService.SendCloseChildAgentConnections(ControllingClient.AgentId, byebyeRegions); | 3366 | AgentCircuitData acd = Scene.AuthenticateHandler.GetAgentCircuitData(UUID); |
3367 | string auth = string.Empty; | ||
3368 | if (acd != null) | ||
3369 | auth = acd.SessionID.ToString(); | ||
3370 | m_scene.SceneGridService.SendCloseChildAgentConnections(ControllingClient.AgentId, auth, byebyeRegions); | ||
3359 | } | 3371 | } |
3360 | 3372 | ||
3361 | foreach (ulong handle in byebyeRegions) | 3373 | foreach (ulong handle in byebyeRegions) |
@@ -3456,6 +3468,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3456 | 3468 | ||
3457 | cAgent.AgentID = UUID; | 3469 | cAgent.AgentID = UUID; |
3458 | cAgent.RegionID = Scene.RegionInfo.RegionID; | 3470 | cAgent.RegionID = Scene.RegionInfo.RegionID; |
3471 | cAgent.SessionID = ControllingClient.SessionId; | ||
3459 | 3472 | ||
3460 | cAgent.Position = AbsolutePosition; | 3473 | cAgent.Position = AbsolutePosition; |
3461 | cAgent.Velocity = m_velocity; | 3474 | cAgent.Velocity = m_velocity; |