aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-11-10 22:58:24 +0000
committerJustin Clark-Casey (justincc)2011-11-10 22:58:24 +0000
commitc0d280d94823125d0b4d56e56fd448d6db5643a7 (patch)
treede38b44d43d6c809eaf7bc7050d512689e541faa /OpenSim/Region/Framework/Scenes
parentAlter commit 3758306 to allow region name to be substituted within a region c... (diff)
parentMerge branch 'master' of git://opensimulator.org/git/opensim (diff)
downloadopensim-SC_OLD-c0d280d94823125d0b4d56e56fd448d6db5643a7.zip
opensim-SC_OLD-c0d280d94823125d0b4d56e56fd448d6db5643a7.tar.gz
opensim-SC_OLD-c0d280d94823125d0b4d56e56fd448d6db5643a7.tar.bz2
opensim-SC_OLD-c0d280d94823125d0b4d56e56fd448d6db5643a7.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs25
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs8
2 files changed, 21 insertions, 12 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index e3a564e..3fa6bb0 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -1731,18 +1731,23 @@ namespace OpenSim.Region.Framework.Scenes
1731 //if ((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0) 1731 //if ((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0)
1732 // return; 1732 // return;
1733 1733
1734 bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0); 1734 // If we somehow got here to updating the SOG and its root part is not scheduled for update,
1735 1735 // check to see if the physical position or rotation warrant an update.
1736 if (UsePhysics && !AbsolutePosition.ApproxEquals(lastPhysGroupPos, 0.02f)) 1736 if (m_rootPart.UpdateFlag == UpdateRequired.NONE)
1737 { 1737 {
1738 m_rootPart.UpdateFlag = UpdateRequired.TERSE; 1738 bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0);
1739 lastPhysGroupPos = AbsolutePosition;
1740 }
1741 1739
1742 if (UsePhysics && !GroupRotation.ApproxEquals(lastPhysGroupRot, 0.1f)) 1740 if (UsePhysics && !AbsolutePosition.ApproxEquals(lastPhysGroupPos, 0.02f))
1743 { 1741 {
1744 m_rootPart.UpdateFlag = UpdateRequired.TERSE; 1742 m_rootPart.UpdateFlag = UpdateRequired.TERSE;
1745 lastPhysGroupRot = GroupRotation; 1743 lastPhysGroupPos = AbsolutePosition;
1744 }
1745
1746 if (UsePhysics && !GroupRotation.ApproxEquals(lastPhysGroupRot, 0.1f))
1747 {
1748 m_rootPart.UpdateFlag = UpdateRequired.TERSE;
1749 lastPhysGroupRot = GroupRotation;
1750 }
1746 } 1751 }
1747 1752
1748 SceneObjectPart[] parts = m_parts.GetArray(); 1753 SceneObjectPart[] parts = m_parts.GetArray();
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 99be46d..fc5141f 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2013,8 +2013,6 @@ namespace OpenSim.Region.Framework.Scenes
2013 sitOrientation = avSitOrientation; 2013 sitOrientation = avSitOrientation;
2014 autopilot = false; 2014 autopilot = false;
2015 } 2015 }
2016 part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
2017
2018 pos = part.AbsolutePosition + offset; 2016 pos = part.AbsolutePosition + offset;
2019 //if (Math.Abs(part.AbsolutePosition.Z - AbsolutePosition.Z) > 1) 2017 //if (Math.Abs(part.AbsolutePosition.Z - AbsolutePosition.Z) > 1)
2020 //{ 2018 //{
@@ -2060,6 +2058,12 @@ namespace OpenSim.Region.Framework.Scenes
2060 m_sitAtAutoTarget = autopilot; 2058 m_sitAtAutoTarget = autopilot;
2061 if (!autopilot) 2059 if (!autopilot)
2062 HandleAgentSit(remoteClient, UUID); 2060 HandleAgentSit(remoteClient, UUID);
2061
2062 // Moved here to avoid a race with default sit anim
2063 // The script event needs to be raised after the default sit anim is set.
2064 if (part != null)
2065 part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
2066
2063 } 2067 }
2064 2068
2065 // public void HandleAgentRequestSit(IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset, string sitAnimation) 2069 // public void HandleAgentRequestSit(IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset, string sitAnimation)