From 17801bd78b339a2a85b318f87f8deae11adb8dc2 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 27 Jan 2011 04:14:41 +0100 Subject: Add a TeleportFlags member to SP so we can tell how we got there. --- OpenSim/Region/Framework/Scenes/Scene.cs | 4 ++++ OpenSim/Region/Framework/Scenes/ScenePresence.cs | 11 +++++++++++ 2 files changed, 15 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 71d0f09..8edf3d3 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3279,6 +3279,10 @@ namespace OpenSim.Region.Framework.Scenes } + // Let the SP know how we got here. This has a lot of interesting + // uses down the line. + sp.TeleportFlags = (TeleportFlags)teleportFlags; + // In all cases, add or update the circuit data with the new agent circuit data and teleport flags agent.teleportFlags = teleportFlags; m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent); diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index fa2c7b5..1c276fa 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -130,6 +130,13 @@ namespace OpenSim.Region.Framework.Scenes private bool m_updateflag; private byte m_movementflag; private Vector3? m_forceToApply; + private TeleportFlags m_teleportFlags; + public TeleportFlags TeleportFlags + { + get { return m_teleportFlags; } + set { m_teleportFlags = value; } + } + private uint m_requestedSitTargetID; private UUID m_requestedSitTargetUUID; public bool SitGround = false; @@ -949,6 +956,10 @@ namespace OpenSim.Region.Framework.Scenes /// public void MakeChildAgent() { + // Reset these so that teleporting in and walking out isn't seen + // as teleporting back + m_teleportFlags = TeleportFlags.Default; + // It looks like m_animator is set to null somewhere, and MakeChild // is called after that. Probably in aborted teleports. if (m_animator == null) -- cgit v1.1