diff options
author | onefang | 2019-07-21 21:25:11 +1000 |
---|---|---|
committer | onefang | 2019-07-21 21:25:11 +1000 |
commit | 5b752dd4b7fd2600157ec90da5051623afe1dc4d (patch) | |
tree | 45e21b1e087d3b127c00778170b0178fb2a75f08 | |
parent | Randomise the spawn points by default. (diff) | |
download | opensim-SC-5b752dd4b7fd2600157ec90da5051623afe1dc4d.zip opensim-SC-5b752dd4b7fd2600157ec90da5051623afe1dc4d.tar.gz opensim-SC-5b752dd4b7fd2600157ec90da5051623afe1dc4d.tar.bz2 opensim-SC-5b752dd4b7fd2600157ec90da5051623afe1dc4d.tar.xz |
TPs from scripts avoid all that silly raycasting nonsense, just go where we ask.
4 files changed, 12 insertions, 10 deletions
diff --git a/OpenSim/Framework/Constants.cs b/OpenSim/Framework/Constants.cs index a79b7d8..15da7e6 100644 --- a/OpenSim/Framework/Constants.cs +++ b/OpenSim/Framework/Constants.cs | |||
@@ -72,7 +72,7 @@ namespace OpenSim.Framework | |||
72 | ViaLure = 1 << 2, | 72 | ViaLure = 1 << 2, |
73 | /// <summary>Via Landmark</summary> | 73 | /// <summary>Via Landmark</summary> |
74 | ViaLandmark = 1 << 3, | 74 | ViaLandmark = 1 << 3, |
75 | /// <summary>Via Location</summary> | 75 | /// <summary>Via Location, seems to be a catch all, includes scripted TPs.</summary> |
76 | ViaLocation = 1 << 4, | 76 | ViaLocation = 1 << 4, |
77 | /// <summary>Via Home</summary> | 77 | /// <summary>Via Home</summary> |
78 | ViaHome = 1 << 5, | 78 | ViaHome = 1 << 5, |
@@ -96,6 +96,8 @@ namespace OpenSim.Framework | |||
96 | ResetHome = 1 << 14, | 96 | ResetHome = 1 << 14, |
97 | /// <summary>forced to new location for example when avatar is banned or ejected</summary> | 97 | /// <summary>forced to new location for example when avatar is banned or ejected</summary> |
98 | ForceRedirect = 1 << 15, | 98 | ForceRedirect = 1 << 15, |
99 | /// <summary>Via script.</summary> | ||
100 | ViaScript = 1 << 16, | ||
99 | /// <summary>Teleport Finished via a Lure</summary> | 101 | /// <summary>Teleport Finished via a Lure</summary> |
100 | FinishedViaLure = 1 << 26, | 102 | FinishedViaLure = 1 << 26, |
101 | /// <summary>Finished, Sim Changed</summary> | 103 | /// <summary>Finished, Sim Changed</summary> |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 8055f92..c0543fd 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1370,7 +1370,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1370 | || (m_teleportFlags & TeleportFlags.ViaLocation) != 0 | 1370 | || (m_teleportFlags & TeleportFlags.ViaLocation) != 0 |
1371 | || (m_teleportFlags & TeleportFlags.ViaHGLogin) != 0); | 1371 | || (m_teleportFlags & TeleportFlags.ViaHGLogin) != 0); |
1372 | 1372 | ||
1373 | if(checkPhysics) | 1373 | if(checkPhysics && (m_teleportFlags & TeleportFlags.ViaScript) == 0) |
1374 | { | 1374 | { |
1375 | // land check was done above | 1375 | // land check was done above |
1376 | RayFilterFlags rayfilter = RayFilterFlags.BackFaceCull; | 1376 | RayFilterFlags rayfilter = RayFilterFlags.BackFaceCull; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 8141c17..84e4546 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4689,7 +4689,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4689 | { | 4689 | { |
4690 | World.RequestTeleportLocation( | 4690 | World.RequestTeleportLocation( |
4691 | presence.ControllingClient, regionInfo.RegionHandle, new Vector3(128, 128, 23), Vector3.Zero, | 4691 | presence.ControllingClient, regionInfo.RegionHandle, new Vector3(128, 128, 23), Vector3.Zero, |
4692 | (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome)); | 4692 | (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome | Constants.TeleportFlags.ViaScript)); |
4693 | } | 4693 | } |
4694 | } | 4694 | } |
4695 | } | 4695 | } |
@@ -4768,7 +4768,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4768 | 4768 | ||
4769 | if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_TELEPORT) != 0) | 4769 | if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_TELEPORT) != 0) |
4770 | { | 4770 | { |
4771 | World.RequestTeleportLocation(presence.ControllingClient, regionHandle, targetPos, targetLookAt, (uint)TeleportFlags.ViaLocation); | 4771 | World.RequestTeleportLocation(presence.ControllingClient, regionHandle, targetPos, targetLookAt, (uint)(Constants.TeleportFlags.ViaLocation | Constants.TeleportFlags.ViaScript)); |
4772 | } | 4772 | } |
4773 | } | 4773 | } |
4774 | } | 4774 | } |
@@ -4782,7 +4782,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4782 | // Use it as a sim name | 4782 | // Use it as a sim name |
4783 | if (assetID == UUID.Zero) | 4783 | if (assetID == UUID.Zero) |
4784 | { | 4784 | { |
4785 | World.RequestTeleportLocation(sp.ControllingClient, destination, targetPos, targetLookAt, (uint)TeleportFlags.ViaLocation); | 4785 | World.RequestTeleportLocation(sp.ControllingClient, destination, targetPos, targetLookAt, (uint)(Constants.TeleportFlags.ViaLocation | Constants.TeleportFlags.ViaScript)); |
4786 | return; | 4786 | return; |
4787 | } | 4787 | } |
4788 | 4788 | ||
@@ -4795,7 +4795,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4795 | 4795 | ||
4796 | AssetLandmark lm = new AssetLandmark(lma); | 4796 | AssetLandmark lm = new AssetLandmark(lma); |
4797 | 4797 | ||
4798 | World.RequestTeleportLocation(sp.ControllingClient, lm.RegionHandle, targetPos, targetLookAt, (uint)TeleportFlags.ViaLocation); | 4798 | World.RequestTeleportLocation(sp.ControllingClient, lm.RegionHandle, targetPos, targetLookAt, (uint)(Constants.TeleportFlags.ViaLocation | Constants.TeleportFlags.ViaScript)); |
4799 | } | 4799 | } |
4800 | 4800 | ||
4801 | public void llTextBox(string agent, string message, int chatChannel) | 4801 | 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 d897098..2be5200 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -880,7 +880,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
880 | { | 880 | { |
881 | // should be faster than going to threadpool | 881 | // should be faster than going to threadpool |
882 | World.RequestTeleportLocation(presence.ControllingClient, regionName, position, | 882 | World.RequestTeleportLocation(presence.ControllingClient, regionName, position, |
883 | lookat, (uint)TPFlags.ViaLocation); | 883 | lookat, (uint)(TPFlags.ViaLocation | TPFlags.ViaScript)); |
884 | } | 884 | } |
885 | else | 885 | else |
886 | { | 886 | { |
@@ -889,7 +889,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
889 | Util.FireAndForget( | 889 | Util.FireAndForget( |
890 | o => World.RequestTeleportLocation( | 890 | o => World.RequestTeleportLocation( |
891 | presence.ControllingClient, regionName, position, | 891 | presence.ControllingClient, regionName, position, |
892 | lookat, (uint)TPFlags.ViaLocation), | 892 | lookat, (uint)(TPFlags.ViaLocation | TPFlags.ViaScript)), |
893 | null, "OSSL_Api.TeleportAgentByRegionCoords"); | 893 | null, "OSSL_Api.TeleportAgentByRegionCoords"); |
894 | } | 894 | } |
895 | } | 895 | } |
@@ -923,7 +923,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
923 | Util.FireAndForget( | 923 | Util.FireAndForget( |
924 | o => World.RequestTeleportLocation( | 924 | o => World.RequestTeleportLocation( |
925 | presence.ControllingClient, regionHandle, | 925 | presence.ControllingClient, regionHandle, |
926 | position, lookat, (uint)TPFlags.ViaLocation), | 926 | position, lookat, (uint)(TPFlags.ViaLocation | TPFlags.ViaScript)), |
927 | null, "OSSL_Api.TeleportAgentByRegionName"); | 927 | null, "OSSL_Api.TeleportAgentByRegionName"); |
928 | } | 928 | } |
929 | } | 929 | } |
@@ -942,7 +942,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
942 | return; | 942 | return; |
943 | 943 | ||
944 | World.RequestTeleportLocation(presence.ControllingClient, World.RegionInfo.RegionName, position, | 944 | World.RequestTeleportLocation(presence.ControllingClient, World.RegionInfo.RegionName, position, |
945 | lookat, (uint)TPFlags.ViaLocation); | 945 | lookat, (uint)(TPFlags.ViaLocation | TPFlags.ViaScript)); |
946 | } | 946 | } |
947 | } | 947 | } |
948 | 948 | ||