diff options
author | Teravus Ovares | 2007-12-30 06:18:17 +0000 |
---|---|---|
committer | Teravus Ovares | 2007-12-30 06:18:17 +0000 |
commit | 32438ab1b9a5c270e0a4a2d708f8c7730dc7e617 (patch) | |
tree | 21595ce38d7a9474c1b3f3eb71c8d50a2763039a /OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |
parent | * Applied Melanie's same instance IM fix. This will make IMs work within the... (diff) | |
download | opensim-SC_OLD-32438ab1b9a5c270e0a4a2d708f8c7730dc7e617.zip opensim-SC_OLD-32438ab1b9a5c270e0a4a2d708f8c7730dc7e617.tar.gz opensim-SC_OLD-32438ab1b9a5c270e0a4a2d708f8c7730dc7e617.tar.bz2 opensim-SC_OLD-32438ab1b9a5c270e0a4a2d708f8c7730dc7e617.tar.xz |
* This update rolls back the packetpool and LibSL changes. Please retest and then patch these changes back in. Currently it's not quite ready for 0.5. The down side to this action, is that we loose some performance to the garbage collector for now. Given that the target date for 0.5 is *Two days* from now, I'm taking the initiative to work towards a real stable version.
* This update also fixes scripting and some weird physics reactions
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 17 |
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 | { |