From 32438ab1b9a5c270e0a4a2d708f8c7730dc7e617 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 30 Dec 2007 06:18:17 +0000 Subject: * 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 --- OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs') 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 public void ServiceObjectPropertiesFamilyRequest(IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags) { //RootPart.ServiceObjectPropertiesFamilyRequest(remoteClient, AgentID, RequestFlags); - ObjectPropertiesFamilyPacket objPropFamilyPack = (ObjectPropertiesFamilyPacket) PacketPool.Instance.GetPacket(PacketType.ObjectPropertiesFamily); + ObjectPropertiesFamilyPacket objPropFamilyPack = new ObjectPropertiesFamilyPacket(); // TODO: don't create new blocks if recycling an old packet ObjectPropertiesFamilyPacket.ObjectDataBlock objPropDB = new ObjectPropertiesFamilyPacket.ObjectDataBlock(); @@ -677,32 +677,26 @@ namespace OpenSim.Region.Environment.Scenes /// public override void Update() { - List parts = new List(m_parts.Values); - if (Util.GetDistanceTo(lastPhysGroupPos, AbsolutePosition) > 0.02) { - foreach (SceneObjectPart part in parts) + foreach (SceneObjectPart part in m_parts.Values) { if (part.UpdateFlag == 0) part.UpdateFlag = 1; } - lastPhysGroupPos = AbsolutePosition; } - if ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1) || (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1) || (Math.Abs(lastPhysGroupRot.Y - GroupRotation.Y) > 0.1) || (Math.Abs(lastPhysGroupRot.Z - GroupRotation.Z) > 0.1)) { - foreach (SceneObjectPart part in parts) + foreach (SceneObjectPart part in m_parts.Values) { if (part.UpdateFlag == 0) part.UpdateFlag = 1; } - lastPhysGroupRot = GroupRotation; } - - foreach (SceneObjectPart part in parts) + foreach (SceneObjectPart part in m_parts.Values) { part.SendScheduledUpdates(); } @@ -1051,7 +1045,7 @@ namespace OpenSim.Region.Environment.Scenes /// public void GetProperites(IClientAPI client) { - ObjectPropertiesPacket proper = (ObjectPropertiesPacket) PacketPool.Instance.GetPacket(PacketType.ObjectProperties); + ObjectPropertiesPacket proper = new ObjectPropertiesPacket(); // TODO: don't create new blocks if recycling an old packet proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1]; @@ -1086,6 +1080,7 @@ namespace OpenSim.Region.Environment.Scenes /// public void SetPartName(string name, uint localID) { + name = name.Remove(name.Length - 1, 1); SceneObjectPart part = GetChildPart(localID); if (part != null) { -- cgit v1.1