aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs17
1 files changed, 6 insertions, 11 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 0f8ce0b..3fc7aec 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -636,7 +636,7 @@ namespace OpenSim.Region.Environment.Scenes
636 public void ServiceObjectPropertiesFamilyRequest(IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags) 636 public void ServiceObjectPropertiesFamilyRequest(IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags)
637 { 637 {
638 //RootPart.ServiceObjectPropertiesFamilyRequest(remoteClient, AgentID, RequestFlags); 638 //RootPart.ServiceObjectPropertiesFamilyRequest(remoteClient, AgentID, RequestFlags);
639 ObjectPropertiesFamilyPacket objPropFamilyPack = (ObjectPropertiesFamilyPacket) PacketPool.Instance.GetPacket(PacketType.ObjectPropertiesFamily); 639 ObjectPropertiesFamilyPacket objPropFamilyPack = new ObjectPropertiesFamilyPacket();
640 // TODO: don't create new blocks if recycling an old packet 640 // TODO: don't create new blocks if recycling an old packet
641 641
642 ObjectPropertiesFamilyPacket.ObjectDataBlock objPropDB = new ObjectPropertiesFamilyPacket.ObjectDataBlock(); 642 ObjectPropertiesFamilyPacket.ObjectDataBlock objPropDB = new ObjectPropertiesFamilyPacket.ObjectDataBlock();
@@ -677,32 +677,26 @@ 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
682 if (Util.GetDistanceTo(lastPhysGroupPos, AbsolutePosition) > 0.02) 680 if (Util.GetDistanceTo(lastPhysGroupPos, AbsolutePosition) > 0.02)
683 { 681 {
684 foreach (SceneObjectPart part in parts) 682 foreach (SceneObjectPart part in m_parts.Values)
685 { 683 {
686 if (part.UpdateFlag == 0) part.UpdateFlag = 1; 684 if (part.UpdateFlag == 0) part.UpdateFlag = 1;
687 } 685 }
688
689 lastPhysGroupPos = AbsolutePosition; 686 lastPhysGroupPos = AbsolutePosition;
690 } 687 }
691
692 if ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1) 688 if ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1)
693 || (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1) 689 || (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1)
694 || (Math.Abs(lastPhysGroupRot.Y - GroupRotation.Y) > 0.1) 690 || (Math.Abs(lastPhysGroupRot.Y - GroupRotation.Y) > 0.1)
695 || (Math.Abs(lastPhysGroupRot.Z - GroupRotation.Z) > 0.1)) 691 || (Math.Abs(lastPhysGroupRot.Z - GroupRotation.Z) > 0.1))
696 { 692 {
697 foreach (SceneObjectPart part in parts) 693 foreach (SceneObjectPart part in m_parts.Values)
698 { 694 {
699 if (part.UpdateFlag == 0) part.UpdateFlag = 1; 695 if (part.UpdateFlag == 0) part.UpdateFlag = 1;
700 } 696 }
701
702 lastPhysGroupRot = GroupRotation; 697 lastPhysGroupRot = GroupRotation;
703 } 698 }
704 699 foreach (SceneObjectPart part in m_parts.Values)
705 foreach (SceneObjectPart part in parts)
706 { 700 {
707 part.SendScheduledUpdates(); 701 part.SendScheduledUpdates();
708 } 702 }
@@ -1051,7 +1045,7 @@ namespace OpenSim.Region.Environment.Scenes
1051 /// <param name="client"></param> 1045 /// <param name="client"></param>
1052 public void GetProperites(IClientAPI client) 1046 public void GetProperites(IClientAPI client)
1053 { 1047 {
1054 ObjectPropertiesPacket proper = (ObjectPropertiesPacket) PacketPool.Instance.GetPacket(PacketType.ObjectProperties); 1048 ObjectPropertiesPacket proper = new ObjectPropertiesPacket();
1055 // TODO: don't create new blocks if recycling an old packet 1049 // TODO: don't create new blocks if recycling an old packet
1056 1050
1057 proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1]; 1051 proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1];
@@ -1086,6 +1080,7 @@ namespace OpenSim.Region.Environment.Scenes
1086 /// <param name="name"></param> 1080 /// <param name="name"></param>
1087 public void SetPartName(string name, uint localID) 1081 public void SetPartName(string name, uint localID)
1088 { 1082 {
1083 name = name.Remove(name.Length - 1, 1);
1089 SceneObjectPart part = GetChildPart(localID); 1084 SceneObjectPart part = GetChildPart(localID);
1090 if (part != null) 1085 if (part != null)
1091 { 1086 {