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).
parent
f219e320bc
commit
77de28965a
|
@ -1015,7 +1015,7 @@ namespace OpenSim.Client.MXP.ClientStack
|
||||||
// Need to translate to MXP somehow
|
// Need to translate to MXP somehow
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendTeleportLocationStart()
|
public void SendTeleportStart(uint flags)
|
||||||
{
|
{
|
||||||
// Need to translate to MXP somehow
|
// Need to translate to MXP somehow
|
||||||
}
|
}
|
||||||
|
|
|
@ -573,7 +573,7 @@ namespace OpenSim.Client.Sirikata.ClientStack
|
||||||
throw new System.NotImplementedException();
|
throw new System.NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendTeleportLocationStart()
|
public void SendTeleportStart(uint flags)
|
||||||
{
|
{
|
||||||
throw new System.NotImplementedException();
|
throw new System.NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
|
@ -579,7 +579,7 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
|
||||||
throw new System.NotImplementedException();
|
throw new System.NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendTeleportLocationStart()
|
public void SendTeleportStart(uint flags)
|
||||||
{
|
{
|
||||||
throw new System.NotImplementedException();
|
throw new System.NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1011,7 +1011,7 @@ namespace OpenSim.Framework
|
||||||
uint flags, string capsURL);
|
uint flags, string capsURL);
|
||||||
|
|
||||||
void SendTeleportFailed(string reason);
|
void SendTeleportFailed(string reason);
|
||||||
void SendTeleportLocationStart();
|
void SendTeleportStart(uint flags);
|
||||||
void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance);
|
void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance);
|
||||||
void SendPayPrice(UUID objectID, int[] payPrice);
|
void SendPayPrice(UUID objectID, int[] payPrice);
|
||||||
|
|
||||||
|
|
|
@ -1432,16 +1432,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SendTeleportLocationStart()
|
public void SendTeleportStart(uint flags)
|
||||||
{
|
{
|
||||||
//TeleportStartPacket tpStart = (TeleportStartPacket)PacketPool.Instance.GetPacket(PacketType.TeleportStart);
|
TeleportStartPacket tpStart = (TeleportStartPacket)PacketPool.Instance.GetPacket(PacketType.TeleportStart);
|
||||||
TeleportStartPacket tpStart = new TeleportStartPacket();
|
//TeleportStartPacket tpStart = new TeleportStartPacket();
|
||||||
tpStart.Info.TeleportFlags = 16; // Teleport via location
|
tpStart.Info.TeleportFlags = flags; //16; // Teleport via location
|
||||||
|
|
||||||
// Hack to get this out immediately and skip throttles
|
// Hack to get this out immediately and skip throttles
|
||||||
OutPacket(tpStart, ThrottleOutPacketType.Unknown);
|
OutPacket(tpStart, ThrottleOutPacketType.Unknown);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SendTeleportProgress(uint flags, string message)
|
||||||
|
{
|
||||||
|
TeleportProgressPacket tpProgress = (TeleportProgressPacket)PacketPool.Instance.GetPacket(PacketType.TeleportProgress);
|
||||||
|
tpProgress.AgentData.AgentID = this.AgentId;
|
||||||
|
tpProgress.Info.TeleportFlags = flags;
|
||||||
|
tpProgress.Info.Message = Util.StringToBytes256(message);
|
||||||
|
|
||||||
|
// Hack to get this out immediately and skip throttles
|
||||||
|
OutPacket(tpProgress, ThrottleOutPacketType.Unknown);
|
||||||
|
}
|
||||||
|
|
||||||
public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance)
|
public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance)
|
||||||
{
|
{
|
||||||
MoneyBalanceReplyPacket money = (MoneyBalanceReplyPacket)PacketPool.Instance.GetPacket(PacketType.MoneyBalanceReply);
|
MoneyBalanceReplyPacket money = (MoneyBalanceReplyPacket)PacketPool.Instance.GetPacket(PacketType.MoneyBalanceReply);
|
||||||
|
|
|
@ -174,9 +174,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
position.Z = newPosZ;
|
position.Z = newPosZ;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only send this if the event queue is null
|
sp.ControllingClient.SendTeleportStart(teleportFlags);
|
||||||
if (eq == null)
|
|
||||||
sp.ControllingClient.SendTeleportLocationStart();
|
|
||||||
|
|
||||||
sp.ControllingClient.SendLocalTeleport(position, lookAt, teleportFlags);
|
sp.ControllingClient.SendLocalTeleport(position, lookAt, teleportFlags);
|
||||||
sp.Teleport(position);
|
sp.Teleport(position);
|
||||||
|
@ -257,9 +255,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
|
|
||||||
ulong destinationHandle = finalDestination.RegionHandle;
|
ulong destinationHandle = finalDestination.RegionHandle;
|
||||||
|
|
||||||
if (eq == null)
|
|
||||||
sp.ControllingClient.SendTeleportLocationStart();
|
|
||||||
|
|
||||||
// Let's do DNS resolution only once in this process, please!
|
// 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,
|
// This may be a costly operation. The reg.ExternalEndPoint field is not a passive field,
|
||||||
// it's actually doing a lot of work.
|
// it's actually doing a lot of work.
|
||||||
|
@ -277,6 +272,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sp.ControllingClient.SendTeleportStart(teleportFlags);
|
||||||
|
|
||||||
// the avatar.Close below will clear the child region list. We need this below for (possibly)
|
// 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).
|
// 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());
|
//List<ulong> childRegions = new List<ulong>(avatar.GetKnownRegionList());
|
||||||
|
@ -320,6 +317,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
|
|
||||||
if (NeedsNewAgent(oldRegionX, newRegionX, oldRegionY, newRegionY))
|
if (NeedsNewAgent(oldRegionX, newRegionX, oldRegionY, newRegionY))
|
||||||
{
|
{
|
||||||
|
|
||||||
#region IP Translation for NAT
|
#region IP Translation for NAT
|
||||||
IClientIPEndpoint ipepClient;
|
IClientIPEndpoint ipepClient;
|
||||||
if (sp.ClientView.TryGet(out ipepClient))
|
if (sp.ClientView.TryGet(out ipepClient))
|
||||||
|
|
|
@ -343,7 +343,6 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
{
|
{
|
||||||
if (!s.IsChildAgent)
|
if (!s.IsChildAgent)
|
||||||
{
|
{
|
||||||
s.ControllingClient.SendTeleportLocationStart();
|
|
||||||
m_scene.TeleportClientHome(user, s.ControllingClient);
|
m_scene.TeleportClientHome(user, s.ControllingClient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -478,7 +477,6 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
ScenePresence s = m_scene.GetScenePresence(prey);
|
ScenePresence s = m_scene.GetScenePresence(prey);
|
||||||
if (s != null)
|
if (s != null)
|
||||||
{
|
{
|
||||||
s.ControllingClient.SendTeleportLocationStart();
|
|
||||||
m_scene.TeleportClientHome(prey, s.ControllingClient);
|
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
|
// Also make sure they are actually in the region
|
||||||
if (p != null && !p.IsChildAgent)
|
if (p != null && !p.IsChildAgent)
|
||||||
{
|
{
|
||||||
p.ControllingClient.SendTeleportLocationStart();
|
|
||||||
m_scene.TeleportClientHome(p.UUID, p.ControllingClient);
|
m_scene.TeleportClientHome(p.UUID, p.ControllingClient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -520,7 +520,7 @@ namespace OpenSim.Region.Examples.SimpleModule
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void SendTeleportLocationStart()
|
public virtual void SendTeleportStart(uint flags)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1035,7 +1035,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendTeleportLocationStart()
|
public void SendTeleportStart(uint flags)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -611,7 +611,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void SendTeleportLocationStart()
|
public virtual void SendTeleportStart(uint flags)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4070,7 +4070,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
if (m_host.OwnerID == World.LandChannel.GetLandObject(
|
if (m_host.OwnerID == World.LandChannel.GetLandObject(
|
||||||
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
|
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
|
||||||
{
|
{
|
||||||
presence.ControllingClient.SendTeleportLocationStart();
|
|
||||||
World.TeleportClientHome(agentId, presence.ControllingClient);
|
World.TeleportClientHome(agentId, presence.ControllingClient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -664,7 +664,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
regionName = regInfo.RegionName;
|
regionName = regInfo.RegionName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
presence.ControllingClient.SendTeleportLocationStart();
|
|
||||||
World.RequestTeleportLocation(presence.ControllingClient, regionName,
|
World.RequestTeleportLocation(presence.ControllingClient, regionName,
|
||||||
new Vector3((float)position.x, (float)position.y, (float)position.z),
|
new Vector3((float)position.x, (float)position.y, (float)position.z),
|
||||||
new Vector3((float)lookat.x, (float)lookat.y, (float)lookat.z), (uint)TPFlags.ViaLocation);
|
new Vector3((float)lookat.x, (float)lookat.y, (float)lookat.z), (uint)TPFlags.ViaLocation);
|
||||||
|
@ -696,7 +695,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
== World.LandChannel.GetLandObject(
|
== World.LandChannel.GetLandObject(
|
||||||
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
|
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
|
||||||
{
|
{
|
||||||
presence.ControllingClient.SendTeleportLocationStart();
|
|
||||||
World.RequestTeleportLocation(presence.ControllingClient, regionHandle,
|
World.RequestTeleportLocation(presence.ControllingClient, regionHandle,
|
||||||
new Vector3((float)position.x, (float)position.y, (float)position.z),
|
new Vector3((float)position.x, (float)position.y, (float)position.z),
|
||||||
new Vector3((float)lookat.x, (float)lookat.y, (float)lookat.z), (uint)TPFlags.ViaLocation);
|
new Vector3((float)lookat.x, (float)lookat.y, (float)lookat.z), (uint)TPFlags.ViaLocation);
|
||||||
|
|
|
@ -614,7 +614,7 @@ namespace OpenSim.Tests.Common.Mock
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void SendTeleportLocationStart()
|
public virtual void SendTeleportStart(uint flags)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue