From b3a12167d6dd9cbd21c57ca103d8c3f60ba93e73 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Mon, 9 Jan 2012 17:54:35 -0500 Subject: Use our TeleportFlags Switch to our TeleportFlags enum instead of LibOMV because we need to define a type for HG Logins. Also moved some debugging in ScenePresence into a function to make it simpler to enable/disable. --- OpenSim/Region/Framework/Scenes/Scene.cs | 4 +- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 48 ++++++++++++++---------- 2 files changed, 30 insertions(+), 22 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 027ec96..5e1c768 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2528,7 +2528,7 @@ namespace OpenSim.Region.Framework.Scenes sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit.Appearance, type); m_eventManager.TriggerOnNewPresence(sp); - sp.TeleportFlags = (TeleportFlags)aCircuit.teleportFlags; + sp.TeleportFlags = (TPFlags)aCircuit.teleportFlags; // The first agent upon login is a root agent by design. // For this agent we will have to rez the attachments. @@ -3333,7 +3333,7 @@ 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; + sp.TeleportFlags = (TPFlags)teleportFlags; if (sp.IsChildAgent) { diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 0837679..d58484e 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -40,6 +40,7 @@ using OpenSim.Region.Framework.Scenes.Types; using OpenSim.Region.Physics.Manager; using GridRegion = OpenSim.Services.Interfaces.GridRegion; using OpenSim.Services.Interfaces; +using TeleportFlags = OpenSim.Framework.Constants.TeleportFlags; namespace OpenSim.Region.Framework.Scenes { @@ -3836,30 +3837,11 @@ namespace OpenSim.Region.Framework.Scenes private void CheckAndAdjustLandingPoint(ref Vector3 pos) { - // Some temporary debugging help to show all the TeleportFlags we have... -// bool HG = false; -// if((m_teleportFlags & (TeleportFlags)Constants.TeleportFlags.ViaHGLogin) == (TeleportFlags)Constants.TeleportFlags.ViaHGLogin) -// HG = true; -// -// m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************"); -// -// uint i = 0u; -// for (int x = 0; x <= 30 ; x++, i = 1u << x) -// { -// i = 1u << x; -// -// if((m_teleportFlags & (TeleportFlags)i) == (TeleportFlags)i) -// if (HG == false) -// m_log.InfoFormat("[SCENE PRESENCE]: Teleport Flags include {0}", ((TeleportFlags) i).ToString()); -// else -// m_log.InfoFormat("[SCENE PRESENCE]: HG Teleport Flags include {0}", ((TeleportFlags)i).ToString()); -// } -// -// m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************"); ILandObject land = m_scene.LandChannel.GetLandObject(pos.X, pos.Y); if (land != null) { + TeleportFlagsDebug(); // If we come in via login, landmark or map, we want to // honor landing points. If we come in via Lure, we want // to ignore them. @@ -3886,5 +3868,31 @@ namespace OpenSim.Region.Framework.Scenes land.SendLandUpdateToClient(ControllingClient); } } + + private void TeleportFlagsDebug() { + + // Some temporary debugging help to show all the TeleportFlags we have... + bool HG = false; + if((m_teleportFlags & TeleportFlags.ViaHGLogin) == TeleportFlags.ViaHGLogin) + HG = true; + + m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************"); + + uint i = 0u; + for (int x = 0; x <= 30 ; x++, i = 1u << x) + { + i = 1u << x; + + if((m_teleportFlags & (TeleportFlags)i) == (TeleportFlags)i) + if (HG == false) + m_log.InfoFormat("[SCENE PRESENCE]: Teleport Flags include {0}", ((TeleportFlags) i).ToString()); + else + m_log.InfoFormat("[SCENE PRESENCE]: HG Teleport Flags include {0}", ((TeleportFlags)i).ToString()); + } + + m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************"); + + } + } } -- cgit v1.1