Removed redundant IClientAPI calls from TreePopulatorModule. Removing tree objects already triggers objectkill packet to client. No need to send again.

remove-scene-viewer
Dan Lake 2011-10-04 16:59:05 -07:00
parent 92c88121c7
commit 146322eb34
1 changed files with 2 additions and 14 deletions

View File

@ -380,13 +380,8 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
if (m_scene.Entities.ContainsKey(tree))
{
SceneObjectPart selectedTree = ((SceneObjectGroup)m_scene.Entities[tree]).RootPart;
// Delete tree and alert clients (not silent)
m_scene.DeleteSceneObject(selectedTree.ParentGroup, false);
m_scene.ForEachClient(delegate(IClientAPI controller)
{
controller.SendKillObject(m_scene.RegionInfo.RegionHandle,
selectedTree.LocalId);
});
}
else
{
@ -719,16 +714,9 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
if (Util.RandomClass.NextDouble() < killLikelyhood)
{
// Delete tree and alert clients (not silent)
m_scene.DeleteSceneObject(selectedTree.ParentGroup, false);
copse.m_trees.Remove(selectedTree.ParentGroup.UUID);
m_scene.ForEachClient(delegate(IClientAPI controller)
{
controller.SendKillObject(m_scene.RegionInfo.RegionHandle,
selectedTree.LocalId);
});
break;
}
}