aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authormeta72010-08-07 11:13:05 -0700
committermeta72010-08-07 11:13:05 -0700
commitcabbd187e7945329c2f0700180f400b11096d33c (patch)
tree306be39a97f96193645bc3a9cc23ada509fde6e0 /OpenSim
parentDelete some files from bin that should not have been committed (diff)
downloadopensim-SC_OLD-cabbd187e7945329c2f0700180f400b11096d33c.zip
opensim-SC_OLD-cabbd187e7945329c2f0700180f400b11096d33c.tar.gz
opensim-SC_OLD-cabbd187e7945329c2f0700180f400b11096d33c.tar.bz2
opensim-SC_OLD-cabbd187e7945329c2f0700180f400b11096d33c.tar.xz
Fix the distance from which autopilot is negated when sitting on an unscripted prim - and also add some more Velocity code to ensure it gets set to zero in all cases
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 882f4a7..56e7e93 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2007,13 +2007,14 @@ namespace OpenSim.Region.Framework.Scenes
2007 if (autopilot) 2007 if (autopilot)
2008 { // its not a scripted sit 2008 { // its not a scripted sit
2009// if (Util.GetDistanceTo(AbsolutePosition, autopilotTarget) < 4.5) 2009// if (Util.GetDistanceTo(AbsolutePosition, autopilotTarget) < 4.5)
2010 if( (Math.Abs(AbsolutePosition.X - autopilotTarget.X) < 2.0f) && (Math.Abs(AbsolutePosition.Y - autopilotTarget.Y) < 2.0f) ) 2010 if( (Math.Abs(AbsolutePosition.X - autopilotTarget.X) < 10.0f) && (Math.Abs(AbsolutePosition.Y - autopilotTarget.Y) < 10.0f) )
2011 { 2011 {
2012 autopilot = false; // close enough 2012 autopilot = false; // close enough
2013 m_lastWorldPosition = m_pos; /* CW - This give us a position to return the avatar to if the part is killed before standup. 2013 m_lastWorldPosition = m_pos; /* CW - This give us a position to return the avatar to if the part is killed before standup.
2014 Not using the part's position because returning the AV to the last known standing 2014 Not using the part's position because returning the AV to the last known standing
2015 position is likely to be more friendly, isn't it? */ 2015 position is likely to be more friendly, isn't it? */
2016 RemoveFromPhysicalScene(); 2016 RemoveFromPhysicalScene();
2017 Velocity = Vector3.Zero;
2017 AbsolutePosition = autopilotTarget + new Vector3(0.0f, 0.0f, (m_sitAvatarHeight / 2.0f)); // Warp av to over sit target 2018 AbsolutePosition = autopilotTarget + new Vector3(0.0f, 0.0f, (m_sitAvatarHeight / 2.0f)); // Warp av to over sit target
2018 } // else the autopilot will get us close 2019 } // else the autopilot will get us close
2019 } 2020 }
@@ -2023,6 +2024,7 @@ namespace OpenSim.Region.Framework.Scenes
2023 I *am* using the part's position this time because we have no real idea how far away 2024 I *am* using the part's position this time because we have no real idea how far away
2024 the avatar is from the sit target. */ 2025 the avatar is from the sit target. */
2025 RemoveFromPhysicalScene(); 2026 RemoveFromPhysicalScene();
2027 Velocity = Vector3.Zero;
2026 } 2028 }
2027 } 2029 }
2028 else return; // physactor is null! 2030 else return; // physactor is null!