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.
iar_mods
BlueWall 2012-01-09 17:54:35 -05:00
parent 95345521f0
commit b3a12167d6
2 changed files with 30 additions and 22 deletions

View File

@ -2528,7 +2528,7 @@ namespace OpenSim.Region.Framework.Scenes
sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit.Appearance, type); sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit.Appearance, type);
m_eventManager.TriggerOnNewPresence(sp); 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. // The first agent upon login is a root agent by design.
// For this agent we will have to rez the attachments. // 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 // Let the SP know how we got here. This has a lot of interesting
// uses down the line. // uses down the line.
sp.TeleportFlags = (TeleportFlags)teleportFlags; sp.TeleportFlags = (TPFlags)teleportFlags;
if (sp.IsChildAgent) if (sp.IsChildAgent)
{ {

View File

@ -40,6 +40,7 @@ using OpenSim.Region.Framework.Scenes.Types;
using OpenSim.Region.Physics.Manager; using OpenSim.Region.Physics.Manager;
using GridRegion = OpenSim.Services.Interfaces.GridRegion; using GridRegion = OpenSim.Services.Interfaces.GridRegion;
using OpenSim.Services.Interfaces; using OpenSim.Services.Interfaces;
using TeleportFlags = OpenSim.Framework.Constants.TeleportFlags;
namespace OpenSim.Region.Framework.Scenes namespace OpenSim.Region.Framework.Scenes
{ {
@ -3836,30 +3837,11 @@ namespace OpenSim.Region.Framework.Scenes
private void CheckAndAdjustLandingPoint(ref Vector3 pos) 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); ILandObject land = m_scene.LandChannel.GetLandObject(pos.X, pos.Y);
if (land != null) if (land != null)
{ {
TeleportFlagsDebug();
// If we come in via login, landmark or map, we want to // If we come in via login, landmark or map, we want to
// honor landing points. If we come in via Lure, we want // honor landing points. If we come in via Lure, we want
// to ignore them. // to ignore them.
@ -3886,5 +3868,31 @@ namespace OpenSim.Region.Framework.Scenes
land.SendLandUpdateToClient(ControllingClient); 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 ******************");
}
} }
} }