Work on TeleportStart: renamed method from TeleportLocationStart to TeleportStart, and now sending this upon all teleports, not just some, and in the right place (EntityTransferModule).

This commit is contained in:
Diva Canto
2010-08-16 11:33:59 -07:00
parent f219e320bc
commit 77de28965a
13 changed files with 27 additions and 24 deletions

View File

@@ -174,9 +174,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
position.Z = newPosZ;
}
// Only send this if the event queue is null
if (eq == null)
sp.ControllingClient.SendTeleportLocationStart();
sp.ControllingClient.SendTeleportStart(teleportFlags);
sp.ControllingClient.SendLocalTeleport(position, lookAt, teleportFlags);
sp.Teleport(position);
@@ -257,9 +255,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
ulong destinationHandle = finalDestination.RegionHandle;
if (eq == null)
sp.ControllingClient.SendTeleportLocationStart();
// Let's do DNS resolution only once in this process, please!
// This may be a costly operation. The reg.ExternalEndPoint field is not a passive field,
// it's actually doing a lot of work.
@@ -277,6 +272,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
return;
}
sp.ControllingClient.SendTeleportStart(teleportFlags);
// the avatar.Close below will clear the child region list. We need this below for (possibly)
// closing the child agents, so save it here (we need a copy as it is Clear()-ed).
//List<ulong> childRegions = new List<ulong>(avatar.GetKnownRegionList());
@@ -320,6 +317,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
if (NeedsNewAgent(oldRegionX, newRegionX, oldRegionY, newRegionY))
{
#region IP Translation for NAT
IClientIPEndpoint ipepClient;
if (sp.ClientView.TryGet(out ipepClient))

View File

@@ -343,7 +343,6 @@ namespace OpenSim.Region.CoreModules.World.Estate
{
if (!s.IsChildAgent)
{
s.ControllingClient.SendTeleportLocationStart();
m_scene.TeleportClientHome(user, s.ControllingClient);
}
}
@@ -478,7 +477,6 @@ namespace OpenSim.Region.CoreModules.World.Estate
ScenePresence s = m_scene.GetScenePresence(prey);
if (s != null)
{
s.ControllingClient.SendTeleportLocationStart();
m_scene.TeleportClientHome(prey, s.ControllingClient);
}
}
@@ -498,7 +496,6 @@ namespace OpenSim.Region.CoreModules.World.Estate
// Also make sure they are actually in the region
if (p != null && !p.IsChildAgent)
{
p.ControllingClient.SendTeleportLocationStart();
m_scene.TeleportClientHome(p.UUID, p.ControllingClient);
}
}