aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorTeravus Ovares2009-03-07 01:18:59 +0000
committerTeravus Ovares2009-03-07 01:18:59 +0000
commitebe84907ae0515c8caf7ca815c4360a16131481a (patch)
treee66f4b7bb37c86a4d4feb673661c99e9692f0647 /OpenSim/Region
parent* Added some limits to the maximum force applied per second by llMoveToTarget... (diff)
downloadopensim-SC-ebe84907ae0515c8caf7ca815c4360a16131481a.zip
opensim-SC-ebe84907ae0515c8caf7ca815c4360a16131481a.tar.gz
opensim-SC-ebe84907ae0515c8caf7ca815c4360a16131481a.tar.bz2
opensim-SC-ebe84907ae0515c8caf7ca815c4360a16131481a.tar.xz
* Fixes mantis: #3241
* Uses 'mouselook' or left mouse button down, to determine when to use the camera's UP axis to determine the direction of movement. * We crouch-slide no more.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs15
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 7db9c07..5160e73 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -547,6 +547,9 @@ namespace OpenSim.Region.Framework.Scenes
547 } 547 }
548 548
549 private bool m_inTransit; 549 private bool m_inTransit;
550 private bool m_mouseLook;
551 private bool m_leftButtonDown;
552
550 public bool IsInTransit 553 public bool IsInTransit
551 { 554 {
552 get { return m_inTransit; } 555 get { return m_inTransit; }
@@ -1141,6 +1144,8 @@ namespace OpenSim.Region.Framework.Scenes
1141 { 1144 {
1142 StandUp(); 1145 StandUp();
1143 } 1146 }
1147 m_mouseLook = (flags & (uint) AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0;
1148 m_leftButtonDown = (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0;
1144 lock (scriptedcontrols) 1149 lock (scriptedcontrols)
1145 { 1150 {
1146 if (scriptedcontrols.Count > 0) 1151 if (scriptedcontrols.Count > 0)
@@ -1206,8 +1211,14 @@ namespace OpenSim.Region.Framework.Scenes
1206 bool bResetMoveToPosition = false; 1211 bool bResetMoveToPosition = false;
1207 1212
1208 Vector3[] dirVectors; 1213 Vector3[] dirVectors;
1209 if (m_physicsActor.Flying) dirVectors = Dir_Vectors; 1214
1210 else dirVectors = GetWalkDirectionVectors(); 1215 // use camera up angle when in mouselook and not flying or when holding the left mouse button down and not flying
1216 // this prevents 'jumping' in inappropriate situations.
1217 if ((m_mouseLook && !m_physicsActor.Flying) || (m_leftButtonDown && !m_physicsActor.Flying))
1218 dirVectors = GetWalkDirectionVectors();
1219 else
1220 dirVectors = Dir_Vectors;
1221
1211 1222
1212 foreach (Dir_ControlFlags DCF in Enum.GetValues(typeof (Dir_ControlFlags))) 1223 foreach (Dir_ControlFlags DCF in Enum.GetValues(typeof (Dir_ControlFlags)))
1213 { 1224 {