several changes to llTeleport so it does HG lms

This commit is contained in:
UbitUmarov
2021-09-15 21:05:00 +01:00
parent 06c8893357
commit a3ab4db5fc
6 changed files with 49 additions and 24 deletions

View File

@@ -62,6 +62,8 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name='client'></param>
bool TeleportHome(UUID id, IClientAPI client);
void RequestTeleportLandmark(IClientAPI remoteClient, AssetLandmark lm, Vector3 lookAt);
/// <summary>
/// Teleport an agent directly to a given region without checking whether the region should be substituted.
/// </summary>

View File

@@ -4996,6 +4996,20 @@ Label_GroupsDone:
EntityTransferModule.Teleport(sp, regionHandle, position, lookAt, teleportFlags);
}
public void RequestTeleportLandmark(IClientAPI remoteClient, AssetLandmark lm, Vector3 lookAt)
{
if (EntityTransferModule == null)
{
m_log.DebugFormat("[SCENE]: Unable to perform teleports: no AgentTransferModule is active");
return;
}
ScenePresence sp = GetScenePresence(remoteClient.AgentId);
if (sp == null || sp.IsDeleted || sp.IsInTransit)
return;
EntityTransferModule.RequestTeleportLandmark(remoteClient, lm, lookAt);
}
public bool CrossAgentToNewRegion(ScenePresence agent, bool isFlying)
{
if (EntityTransferModule != null)