aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs26
1 files changed, 16 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 76e160d..48ae4ca 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2188,6 +2188,8 @@ namespace OpenSim.Region.Framework.Scenes
2188 } 2188 }
2189 2189
2190 group.DeleteGroupFromScene(silent); 2190 group.DeleteGroupFromScene(silent);
2191 if (!silent)
2192 SendKillObject(new List<uint>() { group.LocalId });
2191 2193
2192// m_log.DebugFormat("[SCENE]: Exit DeleteSceneObject() for {0} {1}", group.Name, group.UUID); 2194// m_log.DebugFormat("[SCENE]: Exit DeleteSceneObject() for {0} {1}", group.Name, group.UUID);
2193 } 2195 }
@@ -3273,7 +3275,7 @@ namespace OpenSim.Region.Framework.Scenes
3273 delegate(IClientAPI client) 3275 delegate(IClientAPI client)
3274 { 3276 {
3275 //We can safely ignore null reference exceptions. It means the avatar is dead and cleaned up anyway 3277 //We can safely ignore null reference exceptions. It means the avatar is dead and cleaned up anyway
3276 try { client.SendKillObject(avatar.RegionHandle, avatar.LocalId); } 3278 try { client.SendKillObject(avatar.RegionHandle, new List<uint>() { avatar.LocalId}); }
3277 catch (NullReferenceException) { } 3279 catch (NullReferenceException) { }
3278 }); 3280 });
3279 3281
@@ -3336,18 +3338,24 @@ namespace OpenSim.Region.Framework.Scenes
3336 3338
3337 #region Entities 3339 #region Entities
3338 3340
3339 public void SendKillObject(uint localID) 3341 public void SendKillObject(List<uint> localIDs)
3340 { 3342 {
3341 SceneObjectPart part = GetSceneObjectPart(localID); 3343 List<uint> deleteIDs = new List<uint>();
3342 if (part != null) // It is a prim 3344
3345 foreach (uint localID in localIDs)
3343 { 3346 {
3344 if (part.ParentGroup != null && !part.ParentGroup.IsDeleted) // Valid 3347 SceneObjectPart part = GetSceneObjectPart(localID);
3348 if (part != null) // It is a prim
3345 { 3349 {
3346 if (part.ParentGroup.RootPart != part) // Child part 3350 if (part.ParentGroup != null && !part.ParentGroup.IsDeleted) // Valid
3347 return; 3351 {
3352 if (part.ParentGroup.RootPart != part) // Child part
3353 continue;
3354 }
3348 } 3355 }
3356 deleteIDs.Add(localID);
3349 } 3357 }
3350 ForEachClient(delegate(IClientAPI client) { client.SendKillObject(m_regionHandle, localID); }); 3358 ForEachClient(delegate(IClientAPI client) { client.SendKillObject(m_regionHandle, deleteIDs); });
3351 } 3359 }
3352 3360
3353 #endregion 3361 #endregion
@@ -3365,7 +3373,6 @@ namespace OpenSim.Region.Framework.Scenes
3365 //m_sceneGridService.OnChildAgentUpdate += IncomingChildAgentDataUpdate; 3373 //m_sceneGridService.OnChildAgentUpdate += IncomingChildAgentDataUpdate;
3366 //m_sceneGridService.OnRemoveKnownRegionFromAvatar += HandleRemoveKnownRegionsFromAvatar; 3374 //m_sceneGridService.OnRemoveKnownRegionFromAvatar += HandleRemoveKnownRegionsFromAvatar;
3367 m_sceneGridService.OnLogOffUser += HandleLogOffUserFromGrid; 3375 m_sceneGridService.OnLogOffUser += HandleLogOffUserFromGrid;
3368 m_sceneGridService.KiPrimitive += SendKillObject;
3369 m_sceneGridService.OnGetLandData += GetLandData; 3376 m_sceneGridService.OnGetLandData += GetLandData;
3370 } 3377 }
3371 3378
@@ -3374,7 +3381,6 @@ namespace OpenSim.Region.Framework.Scenes
3374 /// </summary> 3381 /// </summary>
3375 public void UnRegisterRegionWithComms() 3382 public void UnRegisterRegionWithComms()
3376 { 3383 {
3377 m_sceneGridService.KiPrimitive -= SendKillObject;
3378 m_sceneGridService.OnLogOffUser -= HandleLogOffUserFromGrid; 3384 m_sceneGridService.OnLogOffUser -= HandleLogOffUserFromGrid;
3379 //m_sceneGridService.OnRemoveKnownRegionFromAvatar -= HandleRemoveKnownRegionsFromAvatar; 3385 //m_sceneGridService.OnRemoveKnownRegionFromAvatar -= HandleRemoveKnownRegionsFromAvatar;
3380 //m_sceneGridService.OnChildAgentUpdate -= IncomingChildAgentDataUpdate; 3386 //m_sceneGridService.OnChildAgentUpdate -= IncomingChildAgentDataUpdate;