diff options
Bring us up to date.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 0c1da47..8f450f8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -712,9 +712,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
712 | == World.LandChannel.GetLandObject( | 712 | == World.LandChannel.GetLandObject( |
713 | presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) | 713 | presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) |
714 | { | 714 | { |
715 | World.RequestTeleportLocation(presence.ControllingClient, regionName, | 715 | // We will launch the teleport on a new thread so that when the script threads are terminated |
716 | new Vector3((float)position.x, (float)position.y, (float)position.z), | 716 | // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. |
717 | new Vector3((float)lookat.x, (float)lookat.y, (float)lookat.z), (uint)TPFlags.ViaLocation); | 717 | Util.FireAndForget( |
718 | o => World.RequestTeleportLocation(presence.ControllingClient, regionName, | ||
719 | new Vector3((float)position.x, (float)position.y, (float)position.z), | ||
720 | new Vector3((float)lookat.x, (float)lookat.y, (float)lookat.z), (uint)TPFlags.ViaLocation)); | ||
718 | 721 | ||
719 | ScriptSleep(5000); | 722 | ScriptSleep(5000); |
720 | } | 723 | } |
@@ -750,9 +753,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
750 | == World.LandChannel.GetLandObject( | 753 | == World.LandChannel.GetLandObject( |
751 | presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) | 754 | presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) |
752 | { | 755 | { |
753 | World.RequestTeleportLocation(presence.ControllingClient, regionHandle, | 756 | // We will launch the teleport on a new thread so that when the script threads are terminated |
754 | new Vector3((float)position.x, (float)position.y, (float)position.z), | 757 | // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. |
755 | new Vector3((float)lookat.x, (float)lookat.y, (float)lookat.z), (uint)TPFlags.ViaLocation); | 758 | Util.FireAndForget( |
759 | o => World.RequestTeleportLocation(presence.ControllingClient, regionHandle, | ||
760 | new Vector3((float)position.x, (float)position.y, (float)position.z), | ||
761 | new Vector3((float)lookat.x, (float)lookat.y, (float)lookat.z), (uint)TPFlags.ViaLocation)); | ||
762 | |||
756 | ScriptSleep(5000); | 763 | ScriptSleep(5000); |
757 | } | 764 | } |
758 | } | 765 | } |