diff options
author | Justin Clark-Casey (justincc) | 2013-03-12 23:01:27 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-03-12 23:01:27 +0000 |
commit | fb1211ad5ef86bf6a1b6170775f1ebb4adcb4cb7 (patch) | |
tree | 1a1a1e1d7ff84a50900b70d8d4c46fff4ad5f4f8 /OpenSim | |
parent | Improve teleport cancellation in some circumstances, though cancelling telepo... (diff) | |
download | opensim-SC_OLD-fb1211ad5ef86bf6a1b6170775f1ebb4adcb4cb7.zip opensim-SC_OLD-fb1211ad5ef86bf6a1b6170775f1ebb4adcb4cb7.tar.gz opensim-SC_OLD-fb1211ad5ef86bf6a1b6170775f1ebb4adcb4cb7.tar.bz2 opensim-SC_OLD-fb1211ad5ef86bf6a1b6170775f1ebb4adcb4cb7.tar.xz |
Add DisableInterRegionTeleportCancellation option in [EntityTransfer] section of OpenSim.ini. False by default.
This option allows the simulator to specify that the cancel button on inter-region teleports should never appear.
This exists because sometimes cancellation will result in a stuck avatar requiring relog.
It may be hard to prevent this due to the protocol design (the LL grid has the same issue)
In small controlled grids where teleport failure is practically impossible it can be better to disable teleport cancellation entirely.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 21 |
1 files changed, 20 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); |