From aaef497afbedef9382c9afdcb9f8d0d5b0a0e0bc Mon Sep 17 00:00:00 2001 From: onefang Date: Wed, 9 Sep 2020 22:59:24 +1000 Subject: Various teleport fixes. TPs from scripts avoid all that silly raycasting nonsense, just go where we ask. For the "teleport from above" case, do the right thing. Which includes looking for designated floor prims, which have ^ as the first character of their description. Don't do "teleport from above" when we have proper coords. Teleport home from off grid shouldn't land on roofs either. --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 +++--- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index c9ee28e..10afe99 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -5245,7 +5245,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_TELEPORT) != 0) { - World.RequestTeleportLocation(presence.ControllingClient, regionHandle, targetPos, targetLookAt, (uint)TeleportFlags.ViaLocation); + World.RequestTeleportLocation(presence.ControllingClient, regionHandle, targetPos, targetLookAt, (uint)(Constants.TeleportFlags.ViaLocation | Constants.TeleportFlags.ViaScript)); } } } @@ -5259,7 +5259,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // Use it as a sim name if (assetID == UUID.Zero) { - World.RequestTeleportLocation(sp.ControllingClient, destination, targetPos, targetLookAt, (uint)TeleportFlags.ViaLocation); + World.RequestTeleportLocation(sp.ControllingClient, destination, targetPos, targetLookAt, (uint)(Constants.TeleportFlags.ViaLocation | Constants.TeleportFlags.ViaScript)); return; } @@ -5272,7 +5272,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api AssetLandmark lm = new AssetLandmark(lma); - World.RequestTeleportLocation(sp.ControllingClient, lm.RegionHandle, targetPos, targetLookAt, (uint)TeleportFlags.ViaLocation); + World.RequestTeleportLocation(sp.ControllingClient, lm.RegionHandle, targetPos, targetLookAt, (uint)(Constants.TeleportFlags.ViaLocation | Constants.TeleportFlags.ViaScript)); } public void llTextBox(string agent, string message, int chatChannel) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index d268609..48f9d0b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -1071,7 +1071,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api Util.FireAndForget( o => World.RequestTeleportLocation( presence.ControllingClient, regionName, position, - lookat, (uint)TPFlags.ViaLocation), + lookat, (uint)(TPFlags.ViaLocation | TPFlags.ViaScript)), null, "OSSL_Api.TeleportAgentByRegionCoords"); ScriptSleep(5000); } -- cgit v1.1