diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 89e511f..4156f21 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -89,7 +89,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
89 | /// rotation, prim cut, prim twist, prim taper, and prim shear. See mantis | 89 | /// rotation, prim cut, prim twist, prim taper, and prim shear. See mantis |
90 | /// issue #1716 | 90 | /// issue #1716 |
91 | /// </summary> | 91 | /// </summary> |
92 | private static readonly Vector3 SIT_TARGET_ADJUSTMENT = new Vector3(0.1f, 0.0f, 0.3f); | 92 | public static readonly Vector3 SIT_TARGET_ADJUSTMENT = new Vector3(0.1f, 0.0f, 0.3f); |
93 | 93 | ||
94 | /// <summary> | 94 | /// <summary> |
95 | /// Movement updates for agents in neighboring regions are sent directly to clients. | 95 | /// Movement updates for agents in neighboring regions are sent directly to clients. |
@@ -1873,7 +1873,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1873 | AddToPhysicalScene(false); | 1873 | AddToPhysicalScene(false); |
1874 | } | 1874 | } |
1875 | 1875 | ||
1876 | m_pos += ParentPosition + new Vector3(0.0f, 0.0f, 2.0f*m_sitAvatarHeight); | 1876 | m_pos += ParentPosition + new Vector3(0.0f, 0.0f, 2.0f * m_sitAvatarHeight); |
1877 | ParentPosition = Vector3.Zero; | 1877 | ParentPosition = Vector3.Zero; |
1878 | 1878 | ||
1879 | ParentID = 0; | 1879 | ParentID = 0; |
@@ -2283,6 +2283,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2283 | Vector3 sitTargetPos = part.SitTargetPosition; | 2283 | Vector3 sitTargetPos = part.SitTargetPosition; |
2284 | Quaternion sitTargetOrient = part.SitTargetOrientation; | 2284 | Quaternion sitTargetOrient = part.SitTargetOrientation; |
2285 | 2285 | ||
2286 | // m_log.DebugFormat( | ||
2287 | // "[SCENE PRESENCE]: Sitting {0} at sit target {1}, {2} on {3} {4}", | ||
2288 | // Name, sitTargetPos, sitTargetOrient, part.Name, part.LocalId); | ||
2289 | |||
2286 | //Quaternion vq = new Quaternion(sitTargetPos.X, sitTargetPos.Y+0.2f, sitTargetPos.Z+0.2f, 0); | 2290 | //Quaternion vq = new Quaternion(sitTargetPos.X, sitTargetPos.Y+0.2f, sitTargetPos.Z+0.2f, 0); |
2287 | //Quaternion nq = new Quaternion(-sitTargetOrient.X, -sitTargetOrient.Y, -sitTargetOrient.Z, sitTargetOrient.w); | 2291 | //Quaternion nq = new Quaternion(-sitTargetOrient.X, -sitTargetOrient.Y, -sitTargetOrient.Z, sitTargetOrient.w); |
2288 | 2292 | ||
@@ -2291,15 +2295,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
2291 | m_pos = new Vector3(sitTargetPos.X, sitTargetPos.Y, sitTargetPos.Z); | 2295 | m_pos = new Vector3(sitTargetPos.X, sitTargetPos.Y, sitTargetPos.Z); |
2292 | m_pos += SIT_TARGET_ADJUSTMENT; | 2296 | m_pos += SIT_TARGET_ADJUSTMENT; |
2293 | Rotation = sitTargetOrient; | 2297 | Rotation = sitTargetOrient; |
2294 | //Rotation = sitTargetOrient; | ||
2295 | ParentPosition = part.AbsolutePosition; | 2298 | ParentPosition = part.AbsolutePosition; |
2296 | |||
2297 | //SendTerseUpdateToAllClients(); | ||
2298 | } | 2299 | } |
2299 | else | 2300 | else |
2300 | { | 2301 | { |
2301 | m_pos -= part.AbsolutePosition; | 2302 | m_pos -= part.AbsolutePosition; |
2303 | |||
2302 | ParentPosition = part.AbsolutePosition; | 2304 | ParentPosition = part.AbsolutePosition; |
2305 | |||
2306 | // m_log.DebugFormat( | ||
2307 | // "[SCENE PRESENCE]: Sitting {0} at position {1} ({2} + {3}) on part {4} {5} without sit target", | ||
2308 | // Name, part.AbsolutePosition, m_pos, ParentPosition, part.Name, part.LocalId); | ||
2303 | } | 2309 | } |
2304 | } | 2310 | } |
2305 | else | 2311 | else |
@@ -2314,10 +2320,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2314 | 2320 | ||
2315 | Animator.TrySetMovementAnimation(sitAnimation); | 2321 | Animator.TrySetMovementAnimation(sitAnimation); |
2316 | SendAvatarDataToAllAgents(); | 2322 | SendAvatarDataToAllAgents(); |
2317 | // This may seem stupid, but Our Full updates don't send avatar rotation :P | ||
2318 | // So we're also sending a terse update (which has avatar rotation) | ||
2319 | // [Update] We do now. | ||
2320 | //SendTerseUpdateToAllClients(); | ||
2321 | } | 2323 | } |
2322 | 2324 | ||
2323 | /// <summary> | 2325 | /// <summary> |