Fix bug where crossing to a neighbouring region and back again would trigger an exception, and a second recross would stop the user moving until relog

Also fixes an issue where sitting avatar counts became inaccurate after any cross.
Part of the problem was due to cloning code using MemberwiseClone() but not resetting certain collection structures.
Adds regression test for this case.
In relation to http://opensimulator.org/mantis/view.php?id=7050
This commit is contained in:
Justin Clark-Casey (justincc)
2014-04-03 00:19:53 +01:00
parent 2051535ce1
commit e6d0dcd4e8
4 changed files with 138 additions and 8 deletions

View File

@@ -1023,6 +1023,7 @@ namespace OpenSim.Region.Framework.Scenes
else
{
part.ParentGroup.AddAvatar(UUID);
part.AddSittingAvatar(UUID);
if (part.SitTargetPosition != Vector3.Zero)
part.SitTargetAvatar = UUID;
// ParentPosition = part.GetWorldPosition();
@@ -2848,7 +2849,6 @@ namespace OpenSim.Region.Framework.Scenes
part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
}
public void HandleAgentSit(IClientAPI remoteClient, UUID agentID)
{
if (IsChildAgent)