refactor: Split most of EntityTransferModule.Teleport() into its same region and different region teleport components.

DoTeleport() now retrives IEventQueue itself rather than requiring it to be passed in.
This commit is contained in:
Justin Clark-Casey (justincc)
2012-05-01 17:52:30 +01:00
parent b678ea18b2
commit 37dd174697
4 changed files with 205 additions and 137 deletions

View File

@@ -37,12 +37,41 @@ namespace OpenSim.Region.Framework.Interfaces
{
public interface IEntityTransferModule
{
void Teleport(ScenePresence agent, ulong regionHandle, Vector3 position,
Vector3 lookAt, uint teleportFlags);
/// <summary>
/// Teleport an agent within the same or to a different region.
/// </summary>
/// <param name='agent'></param>
/// <param name='regionHandle'>
/// The handle of the destination region. If it's the same as the region currently
/// occupied by the agent then the teleport will be within that region.
/// </param>
/// <param name='position'></param>
/// <param name='lookAt'></param>
/// <param name='teleportFlags'></param>
void Teleport(ScenePresence agent, ulong regionHandle, Vector3 position, Vector3 lookAt, uint teleportFlags);
void DoTeleport(ScenePresence sp, GridRegion reg, GridRegion finalDestination,
Vector3 position, Vector3 lookAt, uint teleportFlags, IEventQueue eq);
/// <summary>
/// Teleport an agent directly to a given region without checking whether the region should be subsituted.
/// </summary>
/// <remarks>
/// Please use Teleport() instead unless you know exactly what you're doing.
/// Do not use for same region teleports.
/// </remarks>
/// <param name='sp'></param>
/// <param name='reg'></param>
/// <param name='finalDestination'>/param>
/// <param name='position'></param>
/// <param name='lookAt'></param>
/// <param name='teleportFlags'></param>
void DoTeleport(
ScenePresence sp, GridRegion reg, GridRegion finalDestination,
Vector3 position, Vector3 lookAt, uint teleportFlags);
/// <summary>
/// Teleports the agent for the given client to their home destination.
/// </summary>
/// <param name='id'></param>
/// <param name='client'></param>
void TeleportHome(UUID id, IClientAPI client);
bool Cross(ScenePresence agent, bool isFlying);