If an object failed to attach due to an exception, then try and detach it from the avatar's list of attachments as well as delete it from the scene.

This may help with the "Inconsistent attachment state" errors seen on teleport.
See http://opensimulator.org/mantis/view.php?id=5644 and linked reports
bulletsim
Justin Clark-Casey (justincc) 2011-08-23 00:04:38 +01:00
parent d328046efb
commit 1f3ce48be1
1 changed files with 2 additions and 1 deletions

View File

@ -316,6 +316,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
objatt.Name, objatt.UUID, sp.Name, e.Message, e.StackTrace);
// Make sure the object doesn't stick around and bail
sp.RemoveAttachment(objatt);
m_scene.DeleteSceneObject(objatt, false);
return null;
}
@ -433,7 +434,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
if (changed && m_scene.AvatarFactory != null)
m_scene.AvatarFactory.QueueAppearanceSave(remoteClient.AgentId);
DetachSingleAttachmentToInv(itemID, presence);
DetachSingleAttachmentToInv(itemID, presence);
}
}