diff options
author | Melanie Thielker | 2008-11-10 05:21:51 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-11-10 05:21:51 +0000 |
commit | fc6f3edec60c391bbd986ee021bff0e5fa4991c0 (patch) | |
tree | df3c3704c39be31cd314918d8fa52dc344978f11 /OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |
parent | Thank you, idb, for a patch that fixes avatar height calculation (diff) | |
download | opensim-SC-fc6f3edec60c391bbd986ee021bff0e5fa4991c0.zip opensim-SC-fc6f3edec60c391bbd986ee021bff0e5fa4991c0.tar.gz opensim-SC-fc6f3edec60c391bbd986ee021bff0e5fa4991c0.tar.bz2 opensim-SC-fc6f3edec60c391bbd986ee021bff0e5fa4991c0.tar.xz |
Stop attachments from causing an update to be sent on every frame in which
an avatar moves.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index a59047b..c17e4a7 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -1575,6 +1575,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1575 | 1575 | ||
1576 | lock (m_parts) | 1576 | lock (m_parts) |
1577 | { | 1577 | { |
1578 | bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0); | ||
1579 | |||
1578 | //if (IsAttachment) | 1580 | //if (IsAttachment) |
1579 | //{ | 1581 | //{ |
1580 | //foreach (SceneObjectPart part in m_parts.Values) | 1582 | //foreach (SceneObjectPart part in m_parts.Values) |
@@ -1584,7 +1586,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1584 | //return; | 1586 | //return; |
1585 | //} | 1587 | //} |
1586 | 1588 | ||
1587 | if (Util.GetDistanceTo(lastPhysGroupPos, AbsolutePosition) > 0.02) | 1589 | if ((Util.GetDistanceTo(lastPhysGroupPos, AbsolutePosition) > 0.02) && UsePhysics) |
1588 | { | 1590 | { |
1589 | m_rootPart.UpdateFlag = 1; | 1591 | m_rootPart.UpdateFlag = 1; |
1590 | lastPhysGroupPos = AbsolutePosition; | 1592 | lastPhysGroupPos = AbsolutePosition; |
@@ -1596,10 +1598,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
1596 | 1598 | ||
1597 | checkAtTargets(); | 1599 | checkAtTargets(); |
1598 | 1600 | ||
1599 | if ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1) | 1601 | if (((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1) |
1600 | || (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1) | 1602 | || (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1) |
1601 | || (Math.Abs(lastPhysGroupRot.Y - GroupRotation.Y) > 0.1) | 1603 | || (Math.Abs(lastPhysGroupRot.Y - GroupRotation.Y) > 0.1) |
1602 | || (Math.Abs(lastPhysGroupRot.Z - GroupRotation.Z) > 0.1)) | 1604 | || (Math.Abs(lastPhysGroupRot.Z - GroupRotation.Z) > 0.1)) |
1605 | && UsePhysics) | ||
1603 | { | 1606 | { |
1604 | m_rootPart.UpdateFlag = 1; | 1607 | m_rootPart.UpdateFlag = 1; |
1605 | 1608 | ||