diff options
author | Justin Clark-Casey (justincc) | 2012-05-21 21:33:59 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-05-21 21:33:59 +0100 |
commit | 9ab0c81c1dfb95e423d73599bd1fc66778749f0d (patch) | |
tree | c239f22c965a1e6ce283e402c5565f9227985189 /OpenSim | |
parent | minor: extend commented out LinkInventoryItem log message for future use (diff) | |
download | opensim-SC_OLD-9ab0c81c1dfb95e423d73599bd1fc66778749f0d.zip opensim-SC_OLD-9ab0c81c1dfb95e423d73599bd1fc66778749f0d.tar.gz opensim-SC_OLD-9ab0c81c1dfb95e423d73599bd1fc66778749f0d.tar.bz2 opensim-SC_OLD-9ab0c81c1dfb95e423d73599bd1fc66778749f0d.tar.xz |
Setting 'in transit' on a local teleport as well as inter-region teleports.
This is to eliminate possible race conditions if two teleport calls are made concurrently, where at least one is a local teleport.
This is pretty much impossible on a manual user teleport but can happen on script-invoked teleports.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 5dbe5e4..36e9da6 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -230,6 +230,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
230 | "[ENTITY TRANSFER MODULE]: Teleport for {0} to {1} within {2}", | 230 | "[ENTITY TRANSFER MODULE]: Teleport for {0} to {1} within {2}", |
231 | sp.Name, position, sp.Scene.RegionInfo.RegionName); | 231 | sp.Name, position, sp.Scene.RegionInfo.RegionName); |
232 | 232 | ||
233 | if (!SetInTransit(sp.UUID)) | ||
234 | { | ||
235 | m_log.DebugFormat( | ||
236 | "[ENTITY TRANSFER MODULE]: Ignoring within region teleport request of {0} {1} to {2} - agent is already in transit.", | ||
237 | sp.Name, sp.UUID, position); | ||
238 | } | ||
239 | |||
233 | // Teleport within the same region | 240 | // Teleport within the same region |
234 | if (IsOutsideRegion(sp.Scene, position) || position.Z < 0) | 241 | if (IsOutsideRegion(sp.Scene, position) || position.Z < 0) |
235 | { | 242 | { |
@@ -268,6 +275,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
268 | { | 275 | { |
269 | sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT); | 276 | sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT); |
270 | } | 277 | } |
278 | |||
279 | ResetFromTransit(sp.UUID); | ||
271 | } | 280 | } |
272 | 281 | ||
273 | /// <summary> | 282 | /// <summary> |