Fix a bug where scene objects attached as HUDs through scripts would not disappear for other avatars.

We do this by sending a kill message for that object to all other avatars apart from the one that has the hud.
0.7.4.1
Justin Clark-Casey (justincc) 2012-06-14 02:26:38 +01:00
parent 0d2243a393
commit 3c3ea19620
1 changed files with 13 additions and 0 deletions

View File

@ -562,6 +562,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
{ {
m_scene.SendKillObject(new List<uint> { so.RootPart.LocalId }); m_scene.SendKillObject(new List<uint> { so.RootPart.LocalId });
} }
else if (so.HasPrivateAttachmentPoint)
{
// m_log.DebugFormat(
// "[ATTACHMENTS MODULE]: Killing private HUD {0} for avatars other than {1} at attachment point {2}",
// so.Name, sp.Name, so.AttachmentPoint);
// Remove the client from everyone in the
m_scene.ForEachClient(
client =>
{ if (client.AgentId != so.AttachedAvatar)
client.SendKillObject(m_scene.RegionInfo.RegionHandle, new List<uint>() { so.LocalId });
});
}
so.IsSelected = false; // fudge.... so.IsSelected = false; // fudge....
so.ScheduleGroupForFullUpdate(); so.ScheduleGroupForFullUpdate();