mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
When updating SOG, a physics taint should not override a full update with a terse update
This commit is contained in:
@@ -1731,18 +1731,23 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
//if ((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0)
|
||||
// return;
|
||||
|
||||
bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0);
|
||||
|
||||
if (UsePhysics && !AbsolutePosition.ApproxEquals(lastPhysGroupPos, 0.02f))
|
||||
// If we somehow got here to updating the SOG and its root part is not scheduled for update,
|
||||
// check to see if the physical position or rotation warrant an update.
|
||||
if (m_rootPart.UpdateFlag == UpdateRequired.NONE)
|
||||
{
|
||||
m_rootPart.UpdateFlag = UpdateRequired.TERSE;
|
||||
lastPhysGroupPos = AbsolutePosition;
|
||||
}
|
||||
bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0);
|
||||
|
||||
if (UsePhysics && !GroupRotation.ApproxEquals(lastPhysGroupRot, 0.1f))
|
||||
{
|
||||
m_rootPart.UpdateFlag = UpdateRequired.TERSE;
|
||||
lastPhysGroupRot = GroupRotation;
|
||||
if (UsePhysics && !AbsolutePosition.ApproxEquals(lastPhysGroupPos, 0.02f))
|
||||
{
|
||||
m_rootPart.UpdateFlag = UpdateRequired.TERSE;
|
||||
lastPhysGroupPos = AbsolutePosition;
|
||||
}
|
||||
|
||||
if (UsePhysics && !GroupRotation.ApproxEquals(lastPhysGroupRot, 0.1f))
|
||||
{
|
||||
m_rootPart.UpdateFlag = UpdateRequired.TERSE;
|
||||
lastPhysGroupRot = GroupRotation;
|
||||
}
|
||||
}
|
||||
|
||||
SceneObjectPart[] parts = m_parts.GetArray();
|
||||
|
||||
Reference in New Issue
Block a user