mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
Patch from Johan: LibSL updated to the latest revision (1568) and all packets are now
recycled to improve performance and memory usage.
This commit is contained in:
@@ -74,13 +74,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
get { return m_rootPart.RotationOffset; }
|
||||
}
|
||||
|
||||
public LLUUID GroupID
|
||||
{
|
||||
get { return m_rootPart.GroupID; }
|
||||
set { m_rootPart.GroupID = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -638,7 +636,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
public void ServiceObjectPropertiesFamilyRequest(IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags)
|
||||
{
|
||||
//RootPart.ServiceObjectPropertiesFamilyRequest(remoteClient, AgentID, RequestFlags);
|
||||
ObjectPropertiesFamilyPacket objPropFamilyPack = new ObjectPropertiesFamilyPacket();
|
||||
ObjectPropertiesFamilyPacket objPropFamilyPack = (ObjectPropertiesFamilyPacket) PacketPool.Instance.GetPacket(PacketType.ObjectPropertiesFamily);
|
||||
// TODO: don't create new blocks if recycling an old packet
|
||||
|
||||
ObjectPropertiesFamilyPacket.ObjectDataBlock objPropDB = new ObjectPropertiesFamilyPacket.ObjectDataBlock();
|
||||
objPropDB.RequestFlags = RequestFlags;
|
||||
objPropDB.ObjectID = RootPart.UUID;
|
||||
@@ -1045,7 +1045,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
/// <param name="client"></param>
|
||||
public void GetProperites(IClientAPI client)
|
||||
{
|
||||
ObjectPropertiesPacket proper = new ObjectPropertiesPacket();
|
||||
ObjectPropertiesPacket proper = (ObjectPropertiesPacket) PacketPool.Instance.GetPacket(PacketType.ObjectProperties);
|
||||
// TODO: don't create new blocks if recycling an old packet
|
||||
|
||||
proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1];
|
||||
proper.ObjectData[0] = new ObjectPropertiesPacket.ObjectDataBlock();
|
||||
proper.ObjectData[0].ItemID = LLUUID.Zero;
|
||||
@@ -1297,6 +1299,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
m_rootPart.PhysActor.IsPhysical);
|
||||
bool UsePhysics = ((m_rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Physics) != 0);
|
||||
m_rootPart.DoPhysicsPropertyUpdate(UsePhysics, true);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1737,4 +1740,4 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
m_rootPart.ApplyPhysics();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user