Instead of going via GodLikeRequestTeleport, auto-teleport the agent directly in a megaregion, in the same manner at the "teleport user" console command.

This is to bypass an issue with the HGLureModule which stops the auto-teleport from happening.
user_profiles
Justin Clark-Casey (justincc) 2013-03-28 02:17:32 +00:00
parent 506d5e41bf
commit b05ed4ffa6
2 changed files with 13 additions and 4 deletions

View File

@ -165,7 +165,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure
(uint)presence.AbsolutePosition.Y, (uint)presence.AbsolutePosition.Y,
(uint)Math.Ceiling(presence.AbsolutePosition.Z)); (uint)Math.Ceiling(presence.AbsolutePosition.Z));
m_log.DebugFormat("TP invite with message {0}", message); m_log.DebugFormat("TP invite with message {0}, type {1}", message, lureType);
GridInstantMessage m = new GridInstantMessage(scene, client.AgentId, GridInstantMessage m = new GridInstantMessage(scene, client.AgentId,
client.FirstName+" "+client.LastName, targetid, client.FirstName+" "+client.LastName, targetid,

View File

@ -379,8 +379,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
Vector3 emergencyPos = new Vector3(128, 128, 128); Vector3 emergencyPos = new Vector3(128, 128, 128);
m_log.WarnFormat( m_log.WarnFormat(
"[ENTITY TRANSFER MODULE]: RequestTeleportToLocation() was given an illegal position of {0} for avatar {1}, {2}. Substituting {3}", "[ENTITY TRANSFER MODULE]: RequestTeleportToLocation() was given an illegal position of {0} for avatar {1}, {2} in {3}. Substituting {4}",
position, sp.Name, sp.UUID, emergencyPos); position, sp.Name, sp.UUID, Scene.Name, emergencyPos);
position = emergencyPos; position = emergencyPos;
} }
@ -1346,7 +1346,15 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
Scene initiatingScene) Scene initiatingScene)
{ {
Thread.Sleep(10000); Thread.Sleep(10000);
agent.Scene.RequestTeleportLocation(
agent.ControllingClient,
Utils.UIntsToLong(regionX * (uint)Constants.RegionSize, regionY * (uint)Constants.RegionSize),
position,
agent.Lookat,
(uint)Constants.TeleportFlags.ViaLocation);
/*
IMessageTransferModule im = initiatingScene.RequestModuleInterface<IMessageTransferModule>(); IMessageTransferModule im = initiatingScene.RequestModuleInterface<IMessageTransferModule>();
if (im != null) if (im != null)
{ {
@ -1381,6 +1389,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
}); });
} }
*/
} }
private void InformClientToInitiateTeleportToLocationCompleted(IAsyncResult iar) private void InformClientToInitiateTeleportToLocationCompleted(IAsyncResult iar)