aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorlbsa712007-12-28 13:11:49 +0000
committerlbsa712007-12-28 13:11:49 +0000
commit5b720b4b3952e182203490961d99e46b8744775e (patch)
treec4f7b0f68217e063e8c47bb3977c7386781877f4 /OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
parent* redid the AddNewPrim refactoring as that got lost in r2855 (diff)
downloadopensim-SC_OLD-5b720b4b3952e182203490961d99e46b8744775e.zip
opensim-SC_OLD-5b720b4b3952e182203490961d99e46b8744775e.tar.gz
opensim-SC_OLD-5b720b4b3952e182203490961d99e46b8744775e.tar.bz2
opensim-SC_OLD-5b720b4b3952e182203490961d99e46b8744775e.tar.xz
* Made a copy of parts before updating to avoid dictionary updated exceptions on big updates
* The part now uses the byte[] TextureEntry instead of the object
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 94b6797..d3f5454 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -677,26 +677,32 @@ namespace OpenSim.Region.Environment.Scenes
677 /// </summary> 677 /// </summary>
678 public override void Update() 678 public override void Update()
679 { 679 {
680 List<SceneObjectPart> parts = new List<SceneObjectPart>(m_parts.Values);
681
680 if (Util.GetDistanceTo(lastPhysGroupPos, AbsolutePosition) > 0.02) 682 if (Util.GetDistanceTo(lastPhysGroupPos, AbsolutePosition) > 0.02)
681 { 683 {
682 foreach (SceneObjectPart part in m_parts.Values) 684 foreach (SceneObjectPart part in parts)
683 { 685 {
684 if (part.UpdateFlag == 0) part.UpdateFlag = 1; 686 if (part.UpdateFlag == 0) part.UpdateFlag = 1;
685 } 687 }
688
686 lastPhysGroupPos = AbsolutePosition; 689 lastPhysGroupPos = AbsolutePosition;
687 } 690 }
691
688 if ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1) 692 if ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1)
689 || (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1) 693 || (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1)
690 || (Math.Abs(lastPhysGroupRot.Y - GroupRotation.Y) > 0.1) 694 || (Math.Abs(lastPhysGroupRot.Y - GroupRotation.Y) > 0.1)
691 || (Math.Abs(lastPhysGroupRot.Z - GroupRotation.Z) > 0.1)) 695 || (Math.Abs(lastPhysGroupRot.Z - GroupRotation.Z) > 0.1))
692 { 696 {
693 foreach (SceneObjectPart part in m_parts.Values) 697 foreach (SceneObjectPart part in parts)
694 { 698 {
695 if (part.UpdateFlag == 0) part.UpdateFlag = 1; 699 if (part.UpdateFlag == 0) part.UpdateFlag = 1;
696 } 700 }
701
697 lastPhysGroupRot = GroupRotation; 702 lastPhysGroupRot = GroupRotation;
698 } 703 }
699 foreach (SceneObjectPart part in m_parts.Values) 704
705 foreach (SceneObjectPart part in parts)
700 { 706 {
701 part.SendScheduledUpdates(); 707 part.SendScheduledUpdates();
702 } 708 }