diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 9 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 19 |
2 files changed, 26 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 2b242fc..45062eb 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -2496,6 +2496,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
2496 | 2496 | ||
2497 | public void SendKillObject(uint localID) | 2497 | public void SendKillObject(uint localID) |
2498 | { | 2498 | { |
2499 | SceneObjectPart part = GetSceneObjectPart(localID); | ||
2500 | if (part != null) // It is a prim | ||
2501 | { | ||
2502 | if (part.ParentGroup != null && part.ParentGroup.RootPart != null) // Valid | ||
2503 | { | ||
2504 | if (part.ParentGroup.RootPart != part) // Child part | ||
2505 | return; | ||
2506 | } | ||
2507 | } | ||
2499 | Broadcast(delegate(IClientAPI client) { client.SendKillObject(m_regionHandle, localID); }); | 2508 | Broadcast(delegate(IClientAPI client) { client.SendKillObject(m_regionHandle, localID); }); |
2500 | } | 2509 | } |
2501 | 2510 | ||
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 9c3d6a7..a86beae 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -105,6 +105,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
105 | /// </summary> | 105 | /// </summary> |
106 | protected Dictionary<LLUUID, SceneObjectPart> m_parts = new Dictionary<LLUUID, SceneObjectPart>(); | 106 | protected Dictionary<LLUUID, SceneObjectPart> m_parts = new Dictionary<LLUUID, SceneObjectPart>(); |
107 | 107 | ||
108 | private bool m_deleted = false; | ||
108 | protected ulong m_regionHandle; | 109 | protected ulong m_regionHandle; |
109 | protected SceneObjectPart m_rootPart; | 110 | protected SceneObjectPart m_rootPart; |
110 | // private Dictionary<LLUUID, scriptEvents> m_scriptEvents = new Dictionary<LLUUID, scriptEvents>(); | 111 | // private Dictionary<LLUUID, scriptEvents> m_scriptEvents = new Dictionary<LLUUID, scriptEvents>(); |
@@ -948,7 +949,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
948 | avatars[i].StandUp(); | 949 | avatars[i].StandUp(); |
949 | } | 950 | } |
950 | 951 | ||
951 | avatars[i].ControllingClient.SendKillObject(m_regionHandle, part.LocalId); | 952 | if (m_rootPart != null && part == m_rootPart) |
953 | avatars[i].ControllingClient.SendKillObject(m_regionHandle, part.LocalId); | ||
952 | } | 954 | } |
953 | } | 955 | } |
954 | 956 | ||
@@ -959,6 +961,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
959 | 961 | ||
960 | public void FakeDeleteGroup() | 962 | public void FakeDeleteGroup() |
961 | { | 963 | { |
964 | m_deleted = true; | ||
965 | |||
962 | foreach (SceneObjectPart part in m_parts.Values) | 966 | foreach (SceneObjectPart part in m_parts.Values) |
963 | { | 967 | { |
964 | List<ScenePresence> avatars = Scene.GetScenePresences(); | 968 | List<ScenePresence> avatars = Scene.GetScenePresences(); |
@@ -969,7 +973,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
969 | avatars[i].StandUp(); | 973 | avatars[i].StandUp(); |
970 | } | 974 | } |
971 | 975 | ||
972 | avatars[i].ControllingClient.SendKillObject(m_regionHandle, part.LocalId); | 976 | if (m_rootPart != null && part == m_rootPart) |
977 | avatars[i].ControllingClient.SendKillObject(m_regionHandle, part.LocalId); | ||
973 | } | 978 | } |
974 | } | 979 | } |
975 | } | 980 | } |
@@ -1543,6 +1548,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
1543 | /// </summary> | 1548 | /// </summary> |
1544 | public void ScheduleGroupForFullUpdate() | 1549 | public void ScheduleGroupForFullUpdate() |
1545 | { | 1550 | { |
1551 | // If we wre in the delete queue, this will be set | ||
1552 | // A full update now would make the prim reappear | ||
1553 | // after KillObject was sent via FakeDeleteGroup | ||
1554 | // causing flickering and delays in deletion. | ||
1555 | // This leads to users clicking delete multiple times | ||
1556 | // which can crash the session. So, avoid it. | ||
1557 | // | ||
1558 | if (m_deleted) | ||
1559 | return; | ||
1560 | |||
1546 | checkAtTargets(); | 1561 | checkAtTargets(); |
1547 | lock (m_parts) | 1562 | lock (m_parts) |
1548 | { | 1563 | { |