diff options
Diffstat (limited to 'OpenSim/Region/Framework')
5 files changed, 107 insertions, 85 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index d293a8b..c132c5d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3609,7 +3609,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3609 | regions.Remove(RegionInfo.RegionHandle); | 3609 | regions.Remove(RegionInfo.RegionHandle); |
3610 | 3610 | ||
3611 | // This ends up being done asynchronously so that a logout isn't held up where there are many present but unresponsive neighbours. | 3611 | // This ends up being done asynchronously so that a logout isn't held up where there are many present but unresponsive neighbours. |
3612 | m_sceneGridService.SendCloseChildAgentConnections(agentID, regions); | 3612 | m_sceneGridService.SendCloseChildAgentConnections(agentID, acd.SessionID.ToString(), regions); |
3613 | } | 3613 | } |
3614 | 3614 | ||
3615 | m_eventManager.TriggerClientClosed(agentID, this); | 3615 | m_eventManager.TriggerClientClosed(agentID, this); |
@@ -3856,7 +3856,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3856 | m_log.WarnFormat( | 3856 | m_log.WarnFormat( |
3857 | "[SCENE]: Existing root scene presence detected for {0} {1} in {2} when connecting. Removing existing presence.", | 3857 | "[SCENE]: Existing root scene presence detected for {0} {1} in {2} when connecting. Removing existing presence.", |
3858 | sp.Name, sp.UUID, RegionInfo.RegionName); | 3858 | sp.Name, sp.UUID, RegionInfo.RegionName); |
3859 | |||
3860 | 3859 | ||
3861 | if (sp.ControllingClient != null) | 3860 | if (sp.ControllingClient != null) |
3862 | sp.ControllingClient.Close(true, true); | 3861 | sp.ControllingClient.Close(true, true); |
@@ -4395,10 +4394,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
4395 | 4394 | ||
4396 | if (childAgentUpdate != null) | 4395 | if (childAgentUpdate != null) |
4397 | { | 4396 | { |
4397 | if (cAgentData.SessionID != childAgentUpdate.ControllingClient.SessionId) | ||
4398 | { | ||
4399 | m_log.WarnFormat("[SCENE]: Attempt to update agent {0} with invalid session id {1} (possibly from simulator in older version; tell them to update).", childAgentUpdate.UUID, cAgentData.SessionID); | ||
4400 | Console.WriteLine(String.Format("[SCENE]: Attempt to update agent {0} ({1}) with invalid session id {2}", | ||
4401 | childAgentUpdate.UUID, childAgentUpdate.ControllingClient.SessionId, cAgentData.SessionID)); | ||
4402 | } | ||
4403 | |||
4398 | childAgentUpdate.ChildAgentDataUpdate(cAgentData); | 4404 | childAgentUpdate.ChildAgentDataUpdate(cAgentData); |
4399 | return true; | 4405 | return true; |
4400 | } | 4406 | } |
4401 | |||
4402 | return false; | 4407 | return false; |
4403 | } | 4408 | } |
4404 | 4409 | ||
@@ -4414,20 +4419,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
4414 | ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID); | 4419 | ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID); |
4415 | if (childAgentUpdate != null) | 4420 | if (childAgentUpdate != null) |
4416 | { | 4421 | { |
4417 | // I can't imagine *yet* why we would get an update if the agent is a root agent.. | 4422 | if (childAgentUpdate.ControllingClient.SessionId == cAgentData.SessionID) |
4418 | // however to avoid a race condition crossing borders.. | 4423 | { |
4419 | if (childAgentUpdate.IsChildAgent) | 4424 | // I can't imagine *yet* why we would get an update if the agent is a root agent.. |
4420 | { | 4425 | // however to avoid a race condition crossing borders.. |
4421 | uint rRegionX = (uint)(cAgentData.RegionHandle >> 40); | 4426 | if (childAgentUpdate.IsChildAgent) |
4422 | uint rRegionY = (((uint)(cAgentData.RegionHandle)) >> 8); | 4427 | { |
4423 | uint tRegionX = RegionInfo.RegionLocX; | 4428 | uint rRegionX = (uint)(cAgentData.RegionHandle >> 40); |
4424 | uint tRegionY = RegionInfo.RegionLocY; | 4429 | uint rRegionY = (((uint)(cAgentData.RegionHandle)) >> 8); |
4425 | //Send Data to ScenePresence | 4430 | uint tRegionX = RegionInfo.RegionLocX; |
4426 | childAgentUpdate.ChildAgentDataUpdate(cAgentData, tRegionX, tRegionY, rRegionX, rRegionY); | 4431 | uint tRegionY = RegionInfo.RegionLocY; |
4427 | // Not Implemented: | 4432 | //Send Data to ScenePresence |
4428 | //TODO: Do we need to pass the message on to one of our neighbors? | 4433 | childAgentUpdate.ChildAgentDataUpdate(cAgentData, tRegionX, tRegionY, rRegionX, rRegionY); |
4434 | // Not Implemented: | ||
4435 | //TODO: Do we need to pass the message on to one of our neighbors? | ||
4436 | } | ||
4429 | } | 4437 | } |
4430 | 4438 | else | |
4439 | m_log.WarnFormat("[SCENE]: Attempt at updating position of agent {0} with invalid session id {1}", childAgentUpdate.UUID, cAgentData.SessionID); | ||
4431 | return true; | 4440 | return true; |
4432 | } | 4441 | } |
4433 | 4442 | ||
@@ -4470,6 +4479,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
4470 | 4479 | ||
4471 | return false; | 4480 | return false; |
4472 | } | 4481 | } |
4482 | /// <summary> | ||
4483 | /// Authenticated close (via network) | ||
4484 | /// </summary> | ||
4485 | /// <param name="agentID"></param> | ||
4486 | /// <param name="force"></param> | ||
4487 | /// <param name="auth_token"></param> | ||
4488 | /// <returns></returns> | ||
4489 | public bool IncomingCloseAgent(UUID agentID, bool force, string auth_token) | ||
4490 | { | ||
4491 | //m_log.DebugFormat("[SCENE]: Processing incoming close agent {0} in region {1} with auth_token {2}", agentID, RegionInfo.RegionName, auth_token); | ||
4492 | |||
4493 | // Check that the auth_token is valid | ||
4494 | AgentCircuitData acd = AuthenticateHandler.GetAgentCircuitData(agentID); | ||
4495 | if (acd != null && acd.SessionID.ToString() == auth_token) | ||
4496 | return IncomingCloseAgent(agentID, force); | ||
4497 | else | ||
4498 | m_log.ErrorFormat("[SCENE]: Request to close agent {0} with invalid authorization token {1}", agentID, auth_token); | ||
4499 | return false; | ||
4500 | } | ||
4473 | 4501 | ||
4474 | public bool IncomingCloseAgent(UUID agentID) | 4502 | public bool IncomingCloseAgent(UUID agentID) |
4475 | { | 4503 | { |
@@ -4492,7 +4520,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4492 | public bool IncomingCloseAgent(UUID agentID, bool force) | 4520 | public bool IncomingCloseAgent(UUID agentID, bool force) |
4493 | { | 4521 | { |
4494 | //m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID); | 4522 | //m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID); |
4495 | |||
4496 | ScenePresence presence = m_sceneGraph.GetScenePresence(agentID); | 4523 | ScenePresence presence = m_sceneGraph.GetScenePresence(agentID); |
4497 | if (presence != null) | 4524 | if (presence != null) |
4498 | { | 4525 | { |
@@ -4500,7 +4527,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4500 | return true; | 4527 | return true; |
4501 | } | 4528 | } |
4502 | 4529 | ||
4503 | // Agent not here | 4530 | // Agent not here |
4504 | return false; | 4531 | return false; |
4505 | } | 4532 | } |
4506 | 4533 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index df61dde..52f46f2 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -200,7 +200,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
200 | /// This Closes child agents on neighboring regions | 200 | /// This Closes child agents on neighboring regions |
201 | /// Calls an asynchronous method to do so.. so it doesn't lag the sim. | 201 | /// Calls an asynchronous method to do so.. so it doesn't lag the sim. |
202 | /// </summary> | 202 | /// </summary> |
203 | protected void SendCloseChildAgentAsync(UUID agentID, ulong regionHandle) | 203 | protected void SendCloseChildAgent(UUID agentID, ulong regionHandle, string auth_token) |
204 | { | 204 | { |
205 | // let's do our best, but there's not much we can do if the neighbour doesn't accept. | 205 | // let's do our best, but there's not much we can do if the neighbour doesn't accept. |
206 | 206 | ||
@@ -209,24 +209,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
209 | Utils.LongToUInts(regionHandle, out x, out y); | 209 | Utils.LongToUInts(regionHandle, out x, out y); |
210 | 210 | ||
211 | GridRegion destination = m_scene.GridService.GetRegionByPosition(m_regionInfo.ScopeID, (int)x, (int)y); | 211 | GridRegion destination = m_scene.GridService.GetRegionByPosition(m_regionInfo.ScopeID, (int)x, (int)y); |
212 | m_scene.SimulationService.CloseChildAgent(destination, agentID); | ||
213 | } | ||
214 | 212 | ||
215 | private void SendCloseChildAgentCompleted(IAsyncResult iar) | 213 | m_log.DebugFormat( |
216 | { | 214 | "[SCENE COMMUNICATION SERVICE]: Sending close agent ID {0} to {1}", agentID, destination.RegionName); |
217 | SendCloseChildAgentDelegate icon = (SendCloseChildAgentDelegate)iar.AsyncState; | 215 | |
218 | icon.EndInvoke(iar); | 216 | m_scene.SimulationService.CloseAgent(destination, agentID, auth_token); |
219 | } | 217 | } |
220 | 218 | ||
221 | public void SendCloseChildAgentConnections(UUID agentID, List<ulong> regionslst) | 219 | /// <summary> |
220 | /// Closes a child agents in a collection of regions. Does so asynchronously | ||
221 | /// so that the caller doesn't wait. | ||
222 | /// </summary> | ||
223 | /// <param name="agentID"></param> | ||
224 | /// <param name="regionslst"></param> | ||
225 | public void SendCloseChildAgentConnections(UUID agentID, string auth_code, List<ulong> regionslst) | ||
222 | { | 226 | { |
223 | foreach (ulong handle in regionslst) | 227 | foreach (ulong handle in regionslst) |
224 | { | 228 | { |
225 | ulong handleCopy = handle; | 229 | ulong handleCopy = handle; |
226 | SendCloseChildAgentDelegate d = SendCloseChildAgentAsync; | 230 | Util.FireAndForget((o) => { SendCloseChildAgent(agentID, handleCopy, auth_code); }); |
227 | d.BeginInvoke(agentID, handleCopy, | ||
228 | SendCloseChildAgentCompleted, | ||
229 | d); | ||
230 | } | 231 | } |
231 | } | 232 | } |
232 | 233 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 2594b1b..59a453a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -4704,50 +4704,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4704 | } | 4704 | } |
4705 | 4705 | ||
4706 | /// <summary> | 4706 | /// <summary> |
4707 | /// Subscribe for physics collision events if needed for scripts and sounds | ||
4708 | /// </summary> | ||
4709 | public void SubscribeForCollisionEvents() | ||
4710 | { | ||
4711 | PhysicsActor pa = PhysActor; | ||
4712 | |||
4713 | if (pa != null) | ||
4714 | { | ||
4715 | if ( | ||
4716 | ((AggregateScriptEvents & scriptEvents.collision) != 0) || | ||
4717 | ((AggregateScriptEvents & scriptEvents.collision_end) != 0) || | ||
4718 | ((AggregateScriptEvents & scriptEvents.collision_start) != 0) || | ||
4719 | ((AggregateScriptEvents & scriptEvents.land_collision_start) != 0) || | ||
4720 | ((AggregateScriptEvents & scriptEvents.land_collision) != 0) || | ||
4721 | ((AggregateScriptEvents & scriptEvents.land_collision_end) != 0) || | ||
4722 | ((ParentGroup.RootPart.AggregateScriptEvents & scriptEvents.collision) != 0) || | ||
4723 | ((ParentGroup.RootPart.AggregateScriptEvents & scriptEvents.collision_end) != 0) || | ||
4724 | ((ParentGroup.RootPart.AggregateScriptEvents & scriptEvents.collision_start) != 0) || | ||
4725 | ((ParentGroup.RootPart.AggregateScriptEvents & scriptEvents.land_collision_start) != 0) || | ||
4726 | ((ParentGroup.RootPart.AggregateScriptEvents & scriptEvents.land_collision) != 0) || | ||
4727 | ((ParentGroup.RootPart.AggregateScriptEvents & scriptEvents.land_collision_end) != 0) || | ||
4728 | (CollisionSound != UUID.Zero) | ||
4729 | ) | ||
4730 | { | ||
4731 | if (!pa.SubscribedEvents()) | ||
4732 | { | ||
4733 | // If not already subscribed for event, set up for a collision event. | ||
4734 | pa.OnCollisionUpdate += PhysicsCollision; | ||
4735 | pa.SubscribeEvents(1000); | ||
4736 | } | ||
4737 | } | ||
4738 | else | ||
4739 | { | ||
4740 | // There is no need to be subscribed to collisions so, if subscribed, remove subscription | ||
4741 | if (pa.SubscribedEvents()) | ||
4742 | { | ||
4743 | pa.OnCollisionUpdate -= PhysicsCollision; | ||
4744 | pa.UnSubscribeEvents(); | ||
4745 | } | ||
4746 | } | ||
4747 | } | ||
4748 | } | ||
4749 | |||
4750 | /// <summary> | ||
4751 | /// Adds this part to the physics scene. | 4707 | /// Adds this part to the physics scene. |
4752 | /// and sets the PhysActor property | 4708 | /// and sets the PhysActor property |
4753 | /// </summary> | 4709 | /// </summary> |
@@ -5205,7 +5161,31 @@ namespace OpenSim.Region.Framework.Scenes | |||
5205 | { | 5161 | { |
5206 | objectflagupdate |= (uint) PrimFlags.AllowInventoryDrop; | 5162 | objectflagupdate |= (uint) PrimFlags.AllowInventoryDrop; |
5207 | } | 5163 | } |
5208 | 5164 | /* | |
5165 | PhysicsActor pa = PhysActor; | ||
5166 | if (pa != null) | ||
5167 | { | ||
5168 | if ( | ||
5169 | // ((AggregateScriptEvents & scriptEvents.collision) != 0) || | ||
5170 | // ((AggregateScriptEvents & scriptEvents.collision_end) != 0) || | ||
5171 | // ((AggregateScriptEvents & scriptEvents.collision_start) != 0) || | ||
5172 | // ((AggregateScriptEvents & scriptEvents.land_collision_start) != 0) || | ||
5173 | // ((AggregateScriptEvents & scriptEvents.land_collision) != 0) || | ||
5174 | // ((AggregateScriptEvents & scriptEvents.land_collision_end) != 0) || | ||
5175 | ((AggregateScriptEvents & PhysicsNeededSubsEvents) != 0) || ((ParentGroup.RootPart.AggregateScriptEvents & PhysicsNeededSubsEvents) != 0) || (CollisionSound != UUID.Zero) | ||
5176 | ) | ||
5177 | { | ||
5178 | // subscribe to physics updates. | ||
5179 | pa.OnCollisionUpdate += PhysicsCollision; | ||
5180 | pa.SubscribeEvents(1000); | ||
5181 | } | ||
5182 | else | ||
5183 | { | ||
5184 | pa.UnSubscribeEvents(); | ||
5185 | pa.OnCollisionUpdate -= PhysicsCollision; | ||
5186 | } | ||
5187 | } | ||
5188 | */ | ||
5209 | UpdatePhysicsSubscribedEvents(); | 5189 | UpdatePhysicsSubscribedEvents(); |
5210 | 5190 | ||
5211 | //if ((GetEffectiveObjectFlags() & (uint)PrimFlags.Scripted) != 0) | 5191 | //if ((GetEffectiveObjectFlags() & (uint)PrimFlags.Scripted) != 0) |
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; |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs index 5a72239..5df9aba 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs | |||
@@ -112,6 +112,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
112 | //moveArgs.BodyRotation = Quaternion.CreateFromEulers(Vector3.Zero); | 112 | //moveArgs.BodyRotation = Quaternion.CreateFromEulers(Vector3.Zero); |
113 | moveArgs.BodyRotation = Quaternion.CreateFromEulers(new Vector3(0, 0, (float)-(Math.PI / 2))); | 113 | moveArgs.BodyRotation = Quaternion.CreateFromEulers(new Vector3(0, 0, (float)-(Math.PI / 2))); |
114 | moveArgs.ControlFlags = (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS; | 114 | moveArgs.ControlFlags = (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS; |
115 | moveArgs.SessionID = acd.SessionID; | ||
115 | 116 | ||
116 | originalSp.HandleAgentUpdate(originalSp.ControllingClient, moveArgs); | 117 | originalSp.HandleAgentUpdate(originalSp.ControllingClient, moveArgs); |
117 | 118 | ||