aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-11-05 01:38:42 +0000
committerJustin Clark-Casey (justincc)2011-11-05 01:38:42 +0000
commit28c4dc9be490a3beedccb17bc1b411e45cced846 (patch)
treea399c6faf3f08e53f20ae4aba546aff9cfdd083e /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
parentAdd comment for experimental effect of removing the Thread.Sleep(20) in ODEPr... (diff)
downloadopensim-SC_OLD-28c4dc9be490a3beedccb17bc1b411e45cced846.zip
opensim-SC_OLD-28c4dc9be490a3beedccb17bc1b411e45cced846.tar.gz
opensim-SC_OLD-28c4dc9be490a3beedccb17bc1b411e45cced846.tar.bz2
opensim-SC_OLD-28c4dc9be490a3beedccb17bc1b411e45cced846.tar.xz
Fix NPC sitting for prims without a sit target.
This is to partially address http://opensimulator.org/mantis/view.php?id=5769 We don't need to call SP.HandleAgentSit() again if we are within 10m since the autopilot won't trigger. By calling it twice, the position of the sitting NPC was wrongly adjusted, ending up near <0,0,0>. However, this change does mean that NPCs further than 10m away will not attempt to autopilot to the prim, though this code was broken anyway (is actually a different mechanism to normal NPC movmeent). Hopefully this can be addressed soon.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index b77f1b6..4071159 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1096,13 +1096,21 @@ namespace OpenSim.Region.Framework.Scenes
1096 public Quaternion SitTargetOrientation 1096 public Quaternion SitTargetOrientation
1097 { 1097 {
1098 get { return m_sitTargetOrientation; } 1098 get { return m_sitTargetOrientation; }
1099 set { m_sitTargetOrientation = value; } 1099 set
1100 {
1101 m_sitTargetOrientation = value;
1102// m_log.DebugFormat("[SCENE OBJECT PART]: Set sit target orientation {0} for {1} {2}", m_sitTargetOrientation, Name, LocalId);
1103 }
1100 } 1104 }
1101 1105
1102 public Vector3 SitTargetPosition 1106 public Vector3 SitTargetPosition
1103 { 1107 {
1104 get { return m_sitTargetPosition; } 1108 get { return m_sitTargetPosition; }
1105 set { m_sitTargetPosition = value; } 1109 set
1110 {
1111 m_sitTargetPosition = value;
1112// m_log.DebugFormat("[SCENE OBJECT PART]: Set sit target position to {0} for {1} {2}", m_sitTargetPosition, Name, LocalId);
1113 }
1106 } 1114 }
1107 1115
1108 // This sort of sucks, but I'm adding these in to make some of 1116 // This sort of sucks, but I'm adding these in to make some of