From 459c7635afdbc4002cacbf5780185645a4296f6a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 24 May 2012 00:31:14 +0100 Subject: If an agent is still registered as 'in transit' by the source region, don't allow an immediate teleport back. This is to help relieve a race condition when an agent teleports then immediately attempts to teleport back before the source region has properly cleaned up/demoted the old ScenePresence. This is rare in viewers but much more possible via scripting or region module. However, more needs to be done since virtually all clean up happens after the transit flag is cleared . Possibly need to add a 'cleaning up' state to in transit. This change required making the EntityTransferModule and HGEntityTransferModule per-region rather than shared, in order to allow separate transit lists. Changes were also required in LocalSimulationConnector. Tested in standalone, grid and with local and remote region crossings with attachments. --- OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs') diff --git a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs index 18e9e3c..75c44d5 100644 --- a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs @@ -74,6 +74,13 @@ namespace OpenSim.Region.Framework.Interfaces /// void TeleportHome(UUID id, IClientAPI client); + /// + /// Show whether the given agent is being teleported. + /// + /// true if the agent is in the process of being teleported, false otherwise. + /// The agent ID + bool IsInTransit(UUID id); + bool Cross(ScenePresence agent, bool isFlying); void AgentArrivedAtDestination(UUID agent); -- cgit v1.1