Stop it being possible for an agent to teleport back to its source region before the source region has finished cleaning up old agent data and structures.

If this is allowed, then the client usually gets forcibly logged out and data structures might be put into bad states.
To prevent this, the binary state machine of EMT.m_agentsInTransit is replaced with a 4 state machine (Preparing, Transferring, ReceivedAtDestination, CleaningUp).
This is necessary because the source region needs to know when the destination region has received the user but a teleport back cannot happen until the source region has cleaned up.
Tested on standalone, grid and with v1 and v3 clients.
This commit is contained in:
Justin Clark-Casey (justincc)
2012-05-25 02:02:53 +01:00
parent 7cceab1295
commit 40c78b0624
3 changed files with 175 additions and 34 deletions

View File

@@ -77,8 +77,8 @@ namespace OpenSim.Region.Framework.Interfaces
/// <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>
/// <returns>true if the agent is in the process of being teleported, false otherwise.</returns>
bool IsInTransit(UUID id);
bool Cross(ScenePresence agent, bool isFlying);