Fix issue where objects removed via llDie() would not disappear for users looking in from neighbouring sims.

This was because this particular code path (unlike user delete) only sent kills to root presences, for no apparent good reason.
Added regression test for this case.
This fixes http://opensimulator.org/mantis/view.php?id=6627
This commit is contained in:
Justin Clark-Casey (justincc)
2013-05-09 18:02:19 +01:00
parent 2b0b9f3e6c
commit 2cb2f1d7e3
8 changed files with 102 additions and 88 deletions

View File

@@ -1221,11 +1221,11 @@ namespace OpenSim.Region.Framework.Scenes
/// <summary>
/// Delete this group from its scene.
/// </summary>
///
/// <remarks>
/// This only handles the in-world consequences of deletion (e.g. any avatars sitting on it are forcibly stood
/// up and all avatars receive notification of its removal. Removal of the scene object from database backup
/// must be handled by the caller.
///
/// </remarks>
/// <param name="silent">If true then deletion is not broadcast to clients</param>
public void DeleteGroupFromScene(bool silent)
{
@@ -1234,10 +1234,10 @@ namespace OpenSim.Region.Framework.Scenes
{
SceneObjectPart part = parts[i];
Scene.ForEachRootScenePresence(delegate(ScenePresence avatar)
Scene.ForEachScenePresence(sp =>
{
if (avatar.ParentID == LocalId)
avatar.StandUp();
if (!sp.IsChildAgent && sp.ParentID == LocalId)
sp.StandUp();
if (!silent)
{
@@ -1245,9 +1245,9 @@ namespace OpenSim.Region.Framework.Scenes
if (part == m_rootPart)
{
if (!IsAttachment
|| AttachedAvatar == avatar.ControllingClient.AgentId
|| AttachedAvatar == sp.UUID
|| !HasPrivateAttachmentPoint)
avatar.ControllingClient.SendKillObject(m_regionHandle, new List<uint> { part.LocalId });
sp.ControllingClient.SendKillObject(m_regionHandle, new List<uint> { part.LocalId });
}
}
});