diff options
author | Kitto Flora | 2010-03-17 13:30:48 -0400 |
---|---|---|
committer | Kitto Flora | 2010-03-17 13:30:48 -0400 |
commit | 6df969894c1943dceeefd3765951daaf0a2eb94c (patch) | |
tree | 8903c8466cb7716003e5c9327aae78ab09da2281 /OpenSim | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
download | opensim-SC_OLD-6df969894c1943dceeefd3765951daaf0a2eb94c.zip opensim-SC_OLD-6df969894c1943dceeefd3765951daaf0a2eb94c.tar.gz opensim-SC_OLD-6df969894c1943dceeefd3765951daaf0a2eb94c.tar.bz2 opensim-SC_OLD-6df969894c1943dceeefd3765951daaf0a2eb94c.tar.xz |
Fix AbsolutePosition for autopilot/sit.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 24179a9..608e84c 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -463,7 +463,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
463 | get | 463 | get |
464 | { | 464 | { |
465 | PhysicsActor actor = m_physicsActor; | 465 | PhysicsActor actor = m_physicsActor; |
466 | if (actor != null) | 466 | // if (actor != null) |
467 | if ((actor != null) && (m_parentID == 0)) // KF Do NOT update m_pos here if Av is sitting! | ||
467 | m_pos = actor.Position; | 468 | m_pos = actor.Position; |
468 | 469 | ||
469 | return m_parentPosition + m_pos; | 470 | return m_parentPosition + m_pos; |
@@ -484,7 +485,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
484 | } | 485 | } |
485 | } | 486 | } |
486 | 487 | ||
487 | m_pos = value; | 488 | if (m_parentID == 0) // KF Do NOT update m_pos here if Av is sitting! |
489 | m_pos = value; | ||
488 | m_parentPosition = Vector3.Zero; | 490 | m_parentPosition = Vector3.Zero; |
489 | } | 491 | } |
490 | } | 492 | } |
@@ -1267,6 +1269,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1267 | m_log.Error("[AVATAR]: NonFinite Avatar position detected... Reset Position. Mantis this please. Error #9999902"); | 1269 | m_log.Error("[AVATAR]: NonFinite Avatar position detected... Reset Position. Mantis this please. Error #9999902"); |
1268 | 1270 | ||
1269 | m_pos = m_LastFinitePos; | 1271 | m_pos = m_LastFinitePos; |
1272 | |||
1270 | if (!m_pos.IsFinite()) | 1273 | if (!m_pos.IsFinite()) |
1271 | { | 1274 | { |
1272 | m_pos.X = 127f; | 1275 | m_pos.X = 127f; |
@@ -1904,6 +1907,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1904 | { | 1907 | { |
1905 | m_avUnscriptedSitPos = Vector3.Zero; // Zero = Sit on prim center | 1908 | m_avUnscriptedSitPos = Vector3.Zero; // Zero = Sit on prim center |
1906 | autopilotTarget = part.AbsolutePosition; | 1909 | autopilotTarget = part.AbsolutePosition; |
1910 | //Console.WriteLine("UsSmall autopilotTarget={0}", autopilotTarget); | ||
1907 | } | 1911 | } |
1908 | else return; // occupied small | 1912 | else return; // occupied small |
1909 | } // end large/small | 1913 | } // end large/small |
@@ -2280,7 +2284,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2280 | m_pos += SIT_TARGET_ADJUSTMENT; | 2284 | m_pos += SIT_TARGET_ADJUSTMENT; |
2281 | m_bodyRot = sitTargetOrient; | 2285 | m_bodyRot = sitTargetOrient; |
2282 | m_parentPosition = part.AbsolutePosition; | 2286 | m_parentPosition = part.AbsolutePosition; |
2283 | part.IsOccupied = true; | 2287 | part.IsOccupied = true; |
2288 | Console.WriteLine("Scripted Sit ofset {0}", m_pos); | ||
2284 | } | 2289 | } |
2285 | else | 2290 | else |
2286 | { | 2291 | { |
@@ -3348,6 +3353,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3348 | m_callbackURI = cAgent.CallbackURI; | 3353 | m_callbackURI = cAgent.CallbackURI; |
3349 | 3354 | ||
3350 | m_pos = cAgent.Position; | 3355 | m_pos = cAgent.Position; |
3356 | |||
3351 | m_velocity = cAgent.Velocity; | 3357 | m_velocity = cAgent.Velocity; |
3352 | m_CameraCenter = cAgent.Center; | 3358 | m_CameraCenter = cAgent.Center; |
3353 | //m_avHeight = cAgent.Size.Z; | 3359 | //m_avHeight = cAgent.Size.Z; |