mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 17:32:42 +08:00
Small performance tweaks to code called by the heartbeat loop
This commit is contained in:
@@ -1857,28 +1857,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0);
|
||||
|
||||
//if (IsAttachment)
|
||||
//{
|
||||
//foreach (SceneObjectPart part in m_parts.Values)
|
||||
//{
|
||||
//part.SendScheduledUpdates();
|
||||
//}
|
||||
//return;
|
||||
//}
|
||||
|
||||
if (UsePhysics && Util.DistanceLessThan(lastPhysGroupPos, AbsolutePosition, 0.02))
|
||||
if (UsePhysics && !AbsolutePosition.ApproxEquals(lastPhysGroupPos, 0.02f))
|
||||
{
|
||||
m_rootPart.UpdateFlag = 1;
|
||||
lastPhysGroupPos = AbsolutePosition;
|
||||
}
|
||||
|
||||
if (UsePhysics && ((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)))
|
||||
if (UsePhysics && !GroupRotation.ApproxEquals(lastPhysGroupRot, 0.1f))
|
||||
{
|
||||
m_rootPart.UpdateFlag = 1;
|
||||
|
||||
lastPhysGroupRot = GroupRotation;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user