diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 4c8c94f..9b04422 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -169,7 +169,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
169 | protected RegionInfo m_regionInfo; | 169 | protected RegionInfo m_regionInfo; |
170 | protected ulong crossingFromRegion; | 170 | protected ulong crossingFromRegion; |
171 | 171 | ||
172 | private readonly Vector3[] Dir_Vectors = new Vector3[9]; | 172 | private readonly Vector3[] Dir_Vectors = new Vector3[11]; |
173 | private bool m_isNudging = false; | 173 | private bool m_isNudging = false; |
174 | 174 | ||
175 | // Position of agent's camera in world (region cordinates) | 175 | // Position of agent's camera in world (region cordinates) |
@@ -236,6 +236,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
236 | DIR_CONTROL_FLAG_DOWN = AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG, | 236 | DIR_CONTROL_FLAG_DOWN = AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG, |
237 | DIR_CONTROL_FLAG_FORWARD_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS, | 237 | DIR_CONTROL_FLAG_FORWARD_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS, |
238 | DIR_CONTROL_FLAG_BACK_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG, | 238 | DIR_CONTROL_FLAG_BACK_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG, |
239 | DIR_CONTROL_FLAG_LEFT_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_POS, | ||
240 | DIR_CONTROL_FLAG_RIGHT_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG, | ||
239 | DIR_CONTROL_FLAG_DOWN_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG | 241 | DIR_CONTROL_FLAG_DOWN_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG |
240 | } | 242 | } |
241 | 243 | ||
@@ -722,12 +724,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
722 | Dir_Vectors[5] = -Vector3.UnitZ; //DOWN | 724 | Dir_Vectors[5] = -Vector3.UnitZ; //DOWN |
723 | Dir_Vectors[6] = new Vector3(0.5f, 0f, 0f); //FORWARD_NUDGE | 725 | Dir_Vectors[6] = new Vector3(0.5f, 0f, 0f); //FORWARD_NUDGE |
724 | Dir_Vectors[7] = new Vector3(-0.5f, 0f, 0f); //BACK_NUDGE | 726 | Dir_Vectors[7] = new Vector3(-0.5f, 0f, 0f); //BACK_NUDGE |
725 | Dir_Vectors[8] = new Vector3(0f, 0f, -0.5f); //DOWN_Nudge | 727 | Dir_Vectors[8] = new Vector3(0f, 0.5f, 0f); //LEFT_NUDGE |
728 | Dir_Vectors[9] = new Vector3(0f, -0.5f, 0f); //RIGHT_NUDGE | ||
729 | Dir_Vectors[10] = new Vector3(0f, 0f, -0.5f); //DOWN_Nudge | ||
726 | } | 730 | } |
727 | 731 | ||
728 | private Vector3[] GetWalkDirectionVectors() | 732 | private Vector3[] GetWalkDirectionVectors() |
729 | { | 733 | { |
730 | Vector3[] vector = new Vector3[9]; | 734 | Vector3[] vector = new Vector3[11]; |
731 | vector[0] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD | 735 | vector[0] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD |
732 | vector[1] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK | 736 | vector[1] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK |
733 | vector[2] = Vector3.UnitY; //LEFT | 737 | vector[2] = Vector3.UnitY; //LEFT |
@@ -736,13 +740,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
736 | vector[5] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN | 740 | vector[5] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN |
737 | vector[6] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD_NUDGE | 741 | vector[6] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD_NUDGE |
738 | vector[7] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK_NUDGE | 742 | vector[7] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK_NUDGE |
739 | vector[8] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN_Nudge | 743 | vector[8] = Vector3.UnitY; //LEFT_NUDGE |
744 | vector[9] = -Vector3.UnitY; //RIGHT_NUDGE | ||
745 | vector[10] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN_Nudge | ||
740 | return vector; | 746 | return vector; |
741 | } | 747 | } |
742 | 748 | ||
743 | private bool[] GetDirectionIsNudge() | 749 | private bool[] GetDirectionIsNudge() |
744 | { | 750 | { |
745 | bool[] isNudge = new bool[9]; | 751 | bool[] isNudge = new bool[11]; |
746 | isNudge[0] = false; //FORWARD | 752 | isNudge[0] = false; //FORWARD |
747 | isNudge[1] = false; //BACK | 753 | isNudge[1] = false; //BACK |
748 | isNudge[2] = false; //LEFT | 754 | isNudge[2] = false; //LEFT |
@@ -751,7 +757,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
751 | isNudge[5] = false; //DOWN | 757 | isNudge[5] = false; //DOWN |
752 | isNudge[6] = true; //FORWARD_NUDGE | 758 | isNudge[6] = true; //FORWARD_NUDGE |
753 | isNudge[7] = true; //BACK_NUDGE | 759 | isNudge[7] = true; //BACK_NUDGE |
754 | isNudge[8] = true; //DOWN_Nudge | 760 | isNudge[8] = true; //LEFT_NUDGE |
761 | isNudge[9] = true; //RIGHT_NUDGE | ||
762 | isNudge[10] = true; //DOWN_Nudge | ||
755 | return isNudge; | 763 | return isNudge; |
756 | } | 764 | } |
757 | 765 | ||