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.0.7.4.1
parent
7e97f0e898
commit
9ab0c81c1d
|
@ -230,6 +230,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
"[ENTITY TRANSFER MODULE]: Teleport for {0} to {1} within {2}",
|
"[ENTITY TRANSFER MODULE]: Teleport for {0} to {1} within {2}",
|
||||||
sp.Name, position, sp.Scene.RegionInfo.RegionName);
|
sp.Name, position, sp.Scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
|
if (!SetInTransit(sp.UUID))
|
||||||
|
{
|
||||||
|
m_log.DebugFormat(
|
||||||
|
"[ENTITY TRANSFER MODULE]: Ignoring within region teleport request of {0} {1} to {2} - agent is already in transit.",
|
||||||
|
sp.Name, sp.UUID, position);
|
||||||
|
}
|
||||||
|
|
||||||
// Teleport within the same region
|
// Teleport within the same region
|
||||||
if (IsOutsideRegion(sp.Scene, position) || position.Z < 0)
|
if (IsOutsideRegion(sp.Scene, position) || position.Z < 0)
|
||||||
{
|
{
|
||||||
|
@ -268,6 +275,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
{
|
{
|
||||||
sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT);
|
sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ResetFromTransit(sp.UUID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue