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.
This commit is contained in:
Justin Clark-Casey (justincc)
2012-05-24 00:31:14 +01:00
parent bc543c1797
commit 459c7635af
6 changed files with 235 additions and 195 deletions

View File

@@ -74,6 +74,13 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name='client'></param>
void TeleportHome(UUID id, IClientAPI client);
/// <summary>
/// Show whether the given agent is being teleported.
/// </summary>
/// <returns>true if the agent is in the process of being teleported, false otherwise.</returns>
/// <param name='id'>The agent ID</para></param>
bool IsInTransit(UUID id);
bool Cross(ScenePresence agent, bool isFlying);
void AgentArrivedAtDestination(UUID agent);