diff options
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 21 | ||||
-rw-r--r-- | bin/OpenSim.ini.example | 7 | ||||
-rw-r--r-- | bin/OpenSimDefaults.ini | 5 |
3 files changed, 32 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 34f0924..9b1b69a 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -66,6 +66,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
66 | /// </summary> | 66 | /// </summary> |
67 | public bool WaitForAgentArrivedAtDestination { get; set; } | 67 | public bool WaitForAgentArrivedAtDestination { get; set; } |
68 | 68 | ||
69 | /// <summary> | ||
70 | /// If true then we ask the viewer to disable teleport cancellation and ignore teleport requests. | ||
71 | /// </summary> | ||
72 | /// <remarks> | ||
73 | /// This is useful in situations where teleport is very likely to always succeed and we want to avoid a | ||
74 | /// situation where avatars can be come 'stuck' due to a failed teleport cancellation. Unfortunately, the | ||
75 | /// nature of the teleport protocol makes it extremely difficult (maybe impossible) to make teleport | ||
76 | /// cancellation consistently suceed. | ||
77 | /// </remarks> | ||
78 | public bool DisableInterRegionTeleportCancellation { get; set; } | ||
79 | |||
69 | protected bool m_Enabled = false; | 80 | protected bool m_Enabled = false; |
70 | 81 | ||
71 | public Scene Scene { get; private set; } | 82 | public Scene Scene { get; private set; } |
@@ -116,6 +127,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
116 | IConfig transferConfig = source.Configs["EntityTransfer"]; | 127 | IConfig transferConfig = source.Configs["EntityTransfer"]; |
117 | if (transferConfig != null) | 128 | if (transferConfig != null) |
118 | { | 129 | { |
130 | DisableInterRegionTeleportCancellation | ||
131 | = transferConfig.GetBoolean("DisableInterRegionTeleportCancellation", false); | ||
132 | |||
119 | WaitForAgentArrivedAtDestination | 133 | WaitForAgentArrivedAtDestination |
120 | = transferConfig.GetBoolean("wait_for_callback", WaitForAgentArrivedAtDestinationDefault); | 134 | = transferConfig.GetBoolean("wait_for_callback", WaitForAgentArrivedAtDestinationDefault); |
121 | 135 | ||
@@ -148,9 +162,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
148 | 162 | ||
149 | protected virtual void OnNewClient(IClientAPI client) | 163 | protected virtual void OnNewClient(IClientAPI client) |
150 | { | 164 | { |
151 | client.OnTeleportCancel += OnClientCancelTeleport; | ||
152 | client.OnTeleportHomeRequest += TeleportHome; | 165 | client.OnTeleportHomeRequest += TeleportHome; |
153 | client.OnTeleportLandmarkRequest += RequestTeleportLandmark; | 166 | client.OnTeleportLandmarkRequest += RequestTeleportLandmark; |
167 | |||
168 | if (!DisableInterRegionTeleportCancellation) | ||
169 | client.OnTeleportCancel += OnClientCancelTeleport; | ||
154 | } | 170 | } |
155 | 171 | ||
156 | public virtual void Close() {} | 172 | public virtual void Close() {} |
@@ -528,6 +544,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
528 | if (sp.ParentID != (uint)0) | 544 | if (sp.ParentID != (uint)0) |
529 | sp.StandUp(); | 545 | sp.StandUp(); |
530 | 546 | ||
547 | if (DisableInterRegionTeleportCancellation) | ||
548 | teleportFlags |= (uint)TeleportFlags.DisableCancel; | ||
549 | |||
531 | // At least on LL 3.3.4, this is not strictly necessary - a teleport will succeed without sending this to | 550 | // At least on LL 3.3.4, this is not strictly necessary - a teleport will succeed without sending this to |
532 | // the viewer. However, it might mean that the viewer does not see the black teleport screen (untested). | 551 | // the viewer. However, it might mean that the viewer does not see the black teleport screen (untested). |
533 | sp.ControllingClient.SendTeleportStart(teleportFlags); | 552 | sp.ControllingClient.SendTeleportStart(teleportFlags); |
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index e078e86..ce2e600 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example | |||
@@ -541,6 +541,13 @@ | |||
541 | ; shout_distance = 100 | 541 | ; shout_distance = 100 |
542 | 542 | ||
543 | 543 | ||
544 | [EntityTransfer] | ||
545 | ;# {DisableInterRegionTeleportCancellation} {} {Determine whether the cancel button is shown at all during teleports.} {false true} false | ||
546 | ;; This option exists because cancelling at certain points can result in an unuseable session (frozen avatar, etc.) | ||
547 | ;; Disabling cancellation can be okay in small closed grids where all teleports are highly likely to suceed. | ||
548 | ;DisableInterRegionTeleportCancellation = false | ||
549 | |||
550 | |||
544 | [Messaging] | 551 | [Messaging] |
545 | ;# {OfflineMessageModule} {} {Module to use for offline message storage} {OfflineMessageModule "Offline Message Module V2" *} | 552 | ;# {OfflineMessageModule} {} {Module to use for offline message storage} {OfflineMessageModule "Offline Message Module V2" *} |
546 | ;; Module to handle offline messaging. The core module requires an external | 553 | ;; Module to handle offline messaging. The core module requires an external |
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 417150a..1d2c0cf 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini | |||
@@ -628,6 +628,11 @@ | |||
628 | ; Minimum user level required for HyperGrid teleports | 628 | ; Minimum user level required for HyperGrid teleports |
629 | LevelHGTeleport = 0 | 629 | LevelHGTeleport = 0 |
630 | 630 | ||
631 | ; Determine whether the cancel button is shown at all during teleports. | ||
632 | ; This option exists because cancelling at certain points can result in an unuseable session (frozen avatar, etc.) | ||
633 | ; Disabling cancellation can be okay in small closed grids where all teleports are highly likely to suceed. | ||
634 | DisableInterRegionTeleportCancellation = false | ||
635 | |||
631 | 636 | ||
632 | [Messaging] | 637 | [Messaging] |
633 | ; Control which region module is used for instant messaging. | 638 | ; Control which region module is used for instant messaging. |