aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
diff options
context:
space:
mode:
authorDiva Canto2013-07-25 23:44:58 -0700
committerDiva Canto2013-07-25 23:44:58 -0700
commit878ce1e6b2b96043052015732286141f5b71310b (patch)
tree62586d92078480f05d47b25aaf5c460310c12cfe /OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
parentReturn Simulator/0.1 (V1) entity transfer behaviour to waiting only 2 seconds... (diff)
downloadopensim-SC_OLD-878ce1e6b2b96043052015732286141f5b71310b.zip
opensim-SC_OLD-878ce1e6b2b96043052015732286141f5b71310b.tar.gz
opensim-SC_OLD-878ce1e6b2b96043052015732286141f5b71310b.tar.bz2
opensim-SC_OLD-878ce1e6b2b96043052015732286141f5b71310b.tar.xz
This should fix all issues with teleports. One should be able to TP as fast as needed. (Although sometimes Justin's state machine kicks in and doesn't let you) The EventQueues are a hairy mess, and it's very easy to mess things up. But it looks like this commit makes them work right. Here's what's going on:
- Child and root agents are only closed after 15 sec, maybe - If the user comes back, they aren't closed, and everything is reused - On the receiving side, clients and scene presences are reused if they already exist - Caps are always recreated (this is where I spent most of my time!). It turns out that, because the agents carry the seeds around, the seed gets the same URL, except for the root agent coming back to a far away region, which gets a new seed (because we don't know what was its seed in the departing region, and we can't send it back to the client when the agent returns there).
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 3f1686c..96cd6b9 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -316,7 +316,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
316 m_log.DebugFormat( 316 m_log.DebugFormat(
317 "[ENTITY TRANSFER MODULE]: Ignoring teleport request of {0} {1} to {2}@{3} - agent is already in transit.", 317 "[ENTITY TRANSFER MODULE]: Ignoring teleport request of {0} {1} to {2}@{3} - agent is already in transit.",
318 sp.Name, sp.UUID, position, regionHandle); 318 sp.Name, sp.UUID, position, regionHandle);
319 319
320 sp.ControllingClient.SendTeleportFailed("Slow down!");
320 return; 321 return;
321 } 322 }
322 323
@@ -1040,9 +1041,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1040 // Now let's make it officially a child agent 1041 // Now let's make it officially a child agent
1041 sp.MakeChildAgent(); 1042 sp.MakeChildAgent();
1042 1043
1043 // OK, it got this agent. Let's close some child agents
1044 sp.CloseChildAgents(newRegionX, newRegionY);
1045
1046 // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone 1044 // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone
1047 1045
1048 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) 1046 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg))
@@ -1059,10 +1057,15 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1059 1057
1060 if (!sp.DoNotCloseAfterTeleport) 1058 if (!sp.DoNotCloseAfterTeleport)
1061 { 1059 {
1060 // OK, it got this agent. Let's close everything
1061 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Closing in agent {0} in region {1}", sp.Name, Scene.RegionInfo.RegionName);
1062 sp.CloseChildAgents(newRegionX, newRegionY);
1062 sp.Scene.IncomingCloseAgent(sp.UUID, false); 1063 sp.Scene.IncomingCloseAgent(sp.UUID, false);
1064
1063 } 1065 }
1064 else 1066 else
1065 { 1067 {
1068 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Not closing agent {0}, user is back in {0}", sp.Name, Scene.RegionInfo.RegionName);
1066 sp.DoNotCloseAfterTeleport = false; 1069 sp.DoNotCloseAfterTeleport = false;
1067 } 1070 }
1068 } 1071 }