aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorMelanie2010-08-30 02:30:28 +0100
committerMelanie2010-08-30 02:30:28 +0100
commit79bfa275da6b8be03678bfa284bd205410296b6a (patch)
tree1ce2f9f2da9bb0e3a8f5628d54f44e45bfc33044 /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
parentRemove CRLF endings (diff)
parentFix a casting operation to use ToString() (diff)
downloadopensim-SC-79bfa275da6b8be03678bfa284bd205410296b6a.zip
opensim-SC-79bfa275da6b8be03678bfa284bd205410296b6a.tar.gz
opensim-SC-79bfa275da6b8be03678bfa284bd205410296b6a.tar.bz2
opensim-SC-79bfa275da6b8be03678bfa284bd205410296b6a.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs49
1 files changed, 26 insertions, 23 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index e003cf8..5a586d4 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -398,6 +398,8 @@ namespace OpenSim.Region.Framework.Scenes
398 398
399 /// <value> 399 /// <value>
400 /// The parts of this scene object group. You must lock this property before using it. 400 /// The parts of this scene object group. You must lock this property before using it.
401 /// If you're doing anything other than reading values, please take a copy of the values rather than locking
402 /// the dictionary for the entirety of the operation. This increases liveness and reduces the danger of deadlock
401 /// If you want to know the number of children, consider using the PrimCount property instead 403 /// If you want to know the number of children, consider using the PrimCount property instead
402 /// </value> 404 /// </value>
403 public Dictionary<UUID, SceneObjectPart> Children 405 public Dictionary<UUID, SceneObjectPart> Children
@@ -2306,29 +2308,29 @@ namespace OpenSim.Region.Framework.Scenes
2306 // return; 2308 // return;
2307 2309
2308 lockPartsForRead(true); 2310 lockPartsForRead(true);
2309 {
2310 bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0);
2311 2311
2312 if (UsePhysics && !AbsolutePosition.ApproxEquals(lastPhysGroupPos, 0.02f)) 2312 bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0);
2313 {
2314 m_rootPart.UpdateFlag = 1;
2315 lastPhysGroupPos = AbsolutePosition;
2316 }
2317 2313
2318 if (UsePhysics && !GroupRotation.ApproxEquals(lastPhysGroupRot, 0.1f)) 2314 if (UsePhysics && !AbsolutePosition.ApproxEquals(lastPhysGroupPos, 0.02f))
2319 { 2315 {
2320 m_rootPart.UpdateFlag = 1; 2316 m_rootPart.UpdateFlag = 1;
2321 lastPhysGroupRot = GroupRotation; 2317 lastPhysGroupPos = AbsolutePosition;
2322 } 2318 }
2323 2319
2324 foreach (SceneObjectPart part in m_parts.Values) 2320 if (UsePhysics && !GroupRotation.ApproxEquals(lastPhysGroupRot, 0.1f))
2325 { 2321 {
2326 if (!IsSelected) 2322 m_rootPart.UpdateFlag = 1;
2327 part.UpdateLookAt(); 2323 lastPhysGroupRot = GroupRotation;
2324 }
2328 2325
2329 part.SendScheduledUpdates(); 2326 List<SceneObjectPart> partList = null;
2330 2327 partList = new List<SceneObjectPart>(m_parts.Values);
2331 } 2328
2329 foreach (SceneObjectPart part in partList)
2330 {
2331 if (!IsSelected)
2332 part.UpdateLookAt();
2333 part.SendScheduledUpdates();
2332 } 2334 }
2333 lockPartsForRead(false); 2335 lockPartsForRead(false);
2334 } 2336 }
@@ -3161,11 +3163,12 @@ namespace OpenSim.Region.Framework.Scenes
3161 public void UpdatePermissions(UUID AgentID, byte field, uint localID, 3163 public void UpdatePermissions(UUID AgentID, byte field, uint localID,
3162 uint mask, byte addRemTF) 3164 uint mask, byte addRemTF)
3163 { 3165 {
3166 List<SceneObjectPart> partList = null;
3164 lock (m_parts) 3167 lock (m_parts)
3165 { 3168 partList = new List<SceneObjectPart>(m_parts.Values);
3166 foreach (SceneObjectPart part in m_parts.Values) 3169
3167 part.UpdatePermissions(AgentID, field, localID, mask, addRemTF); 3170 foreach (SceneObjectPart part in partList)
3168 } 3171 part.UpdatePermissions(AgentID, field, localID, mask, addRemTF);
3169 3172
3170 HasGroupChanged = true; 3173 HasGroupChanged = true;
3171 } 3174 }