replace hack by sog kills on tp out

avinationmerge
UbitUmarov 2014-08-21 23:43:06 +01:00
parent d5bb80798d
commit be02fb3904
1 changed files with 15 additions and 1 deletions

View File

@ -5848,18 +5848,32 @@ namespace OpenSim.Region.Framework.Scenes
public void HasMovedAway() public void HasMovedAway()
{ {
List<uint> myids = new List<uint>();
foreach (SceneObjectGroup sog in m_attachments)
myids.Add(sog.RootPart.LocalId);
myids.Add(LocalId);
List<ScenePresence> allpresences = m_scene.GetScenePresences(); List<ScenePresence> allpresences = m_scene.GetScenePresences();
foreach (ScenePresence p in allpresences) foreach (ScenePresence p in allpresences)
{ {
if (p == this) if (p == this)
continue; continue;
SendKillTo(p); p.ControllingClient.SendKillObject(myids);
p.SendKillTo(this); p.SendKillTo(this);
} }
if (Scene.AttachmentsModule != null) if (Scene.AttachmentsModule != null)
Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true); Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true);
} }
public void SendFullKillsTo(ScenePresence p)
{
List<uint> ids = new List<uint>();
foreach (SceneObjectGroup sog in m_attachments)
ids.Add(sog.RootPart.LocalId);
ids.Add(LocalId);
p.ControllingClient.SendKillObject(ids);
}
public void SendKillTo(ScenePresence p) public void SendKillTo(ScenePresence p)
{ {
foreach (SceneObjectGroup sog in m_attachments) foreach (SceneObjectGroup sog in m_attachments)