diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 57 |
1 files changed, 4 insertions, 53 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index f05fe59..c3bc96a 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -173,12 +173,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
173 | protected RegionInfo m_regionInfo; | 173 | protected RegionInfo m_regionInfo; |
174 | protected ulong crossingFromRegion; | 174 | protected ulong crossingFromRegion; |
175 | 175 | ||
176 | <<<<<<< HEAD:OpenSim/Region/Framework/Scenes/ScenePresence.cs | ||
177 | private readonly Vector3[] Dir_Vectors = new Vector3[11]; | 176 | private readonly Vector3[] Dir_Vectors = new Vector3[11]; |
178 | private bool m_isNudging = false; | 177 | private bool m_isNudging = false; |
179 | ======= | ||
180 | private readonly Vector3[] Dir_Vectors = new Vector3[9]; | ||
181 | >>>>>>> master:OpenSim/Region/Framework/Scenes/ScenePresence.cs | ||
182 | 178 | ||
183 | // Position of agent's camera in world (region cordinates) | 179 | // Position of agent's camera in world (region cordinates) |
184 | protected Vector3 m_CameraCenter; | 180 | protected Vector3 m_CameraCenter; |
@@ -247,13 +243,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
247 | DIR_CONTROL_FLAG_UP = AgentManager.ControlFlags.AGENT_CONTROL_UP_POS, | 243 | DIR_CONTROL_FLAG_UP = AgentManager.ControlFlags.AGENT_CONTROL_UP_POS, |
248 | DIR_CONTROL_FLAG_DOWN = AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG, | 244 | DIR_CONTROL_FLAG_DOWN = AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG, |
249 | DIR_CONTROL_FLAG_FORWARD_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS, | 245 | DIR_CONTROL_FLAG_FORWARD_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS, |
250 | <<<<<<< HEAD:OpenSim/Region/Framework/Scenes/ScenePresence.cs | ||
251 | DIR_CONTROL_FLAG_BACK_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG, | 246 | DIR_CONTROL_FLAG_BACK_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG, |
252 | DIR_CONTROL_FLAG_LEFT_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_POS, | 247 | DIR_CONTROL_FLAG_LEFT_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_POS, |
253 | DIR_CONTROL_FLAG_RIGHT_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG, | 248 | DIR_CONTROL_FLAG_RIGHT_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG, |
254 | ======= | ||
255 | DIR_CONTROL_FLAG_BACKWARD_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG, | ||
256 | >>>>>>> master:OpenSim/Region/Framework/Scenes/ScenePresence.cs | ||
257 | DIR_CONTROL_FLAG_DOWN_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG | 249 | DIR_CONTROL_FLAG_DOWN_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG |
258 | } | 250 | } |
259 | 251 | ||
@@ -735,43 +727,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
735 | Dir_Vectors[3] = -Vector3.UnitY; //RIGHT | 727 | Dir_Vectors[3] = -Vector3.UnitY; //RIGHT |
736 | Dir_Vectors[4] = Vector3.UnitZ; //UP | 728 | Dir_Vectors[4] = Vector3.UnitZ; //UP |
737 | Dir_Vectors[5] = -Vector3.UnitZ; //DOWN | 729 | Dir_Vectors[5] = -Vector3.UnitZ; //DOWN |
738 | <<<<<<< HEAD:OpenSim/Region/Framework/Scenes/ScenePresence.cs | ||
739 | Dir_Vectors[6] = new Vector3(0.5f, 0f, 0f); //FORWARD_NUDGE | 730 | Dir_Vectors[6] = new Vector3(0.5f, 0f, 0f); //FORWARD_NUDGE |
740 | Dir_Vectors[7] = new Vector3(-0.5f, 0f, 0f); //BACK_NUDGE | 731 | Dir_Vectors[7] = new Vector3(-0.5f, 0f, 0f); //BACK_NUDGE |
741 | Dir_Vectors[8] = new Vector3(0f, 0.5f, 0f); //LEFT_NUDGE | 732 | Dir_Vectors[8] = new Vector3(0f, 0.5f, 0f); //LEFT_NUDGE |
742 | Dir_Vectors[9] = new Vector3(0f, -0.5f, 0f); //RIGHT_NUDGE | 733 | Dir_Vectors[9] = new Vector3(0f, -0.5f, 0f); //RIGHT_NUDGE |
743 | Dir_Vectors[10] = new Vector3(0f, 0f, -0.5f); //DOWN_Nudge | 734 | Dir_Vectors[10] = new Vector3(0f, 0f, -0.5f); //DOWN_Nudge |
744 | ======= | ||
745 | Dir_Vectors[8] = new Vector3(0f, 0f, -0.5f); //DOWN_Nudge | ||
746 | Dir_Vectors[6] = Vector3.UnitX*2; //FORWARD | ||
747 | Dir_Vectors[7] = -Vector3.UnitX; //BACK | ||
748 | >>>>>>> master:OpenSim/Region/Framework/Scenes/ScenePresence.cs | ||
749 | } | 735 | } |
750 | 736 | ||
751 | private Vector3[] GetWalkDirectionVectors() | 737 | private Vector3[] GetWalkDirectionVectors() |
752 | { | 738 | { |
753 | <<<<<<< HEAD:OpenSim/Region/Framework/Scenes/ScenePresence.cs | ||
754 | Vector3[] vector = new Vector3[11]; | 739 | Vector3[] vector = new Vector3[11]; |
755 | ======= | ||
756 | Vector3[] vector = new Vector3[9]; | ||
757 | >>>>>>> master:OpenSim/Region/Framework/Scenes/ScenePresence.cs | ||
758 | vector[0] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD | 740 | vector[0] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD |
759 | vector[1] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK | 741 | vector[1] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK |
760 | vector[2] = Vector3.UnitY; //LEFT | 742 | vector[2] = Vector3.UnitY; //LEFT |
761 | vector[3] = -Vector3.UnitY; //RIGHT | 743 | vector[3] = -Vector3.UnitY; //RIGHT |
762 | vector[4] = new Vector3(m_CameraAtAxis.Z, 0f, m_CameraUpAxis.Z); //UP | 744 | vector[4] = new Vector3(m_CameraAtAxis.Z, 0f, m_CameraUpAxis.Z); //UP |
763 | vector[5] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN | 745 | vector[5] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN |
764 | <<<<<<< HEAD:OpenSim/Region/Framework/Scenes/ScenePresence.cs | ||
765 | vector[6] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD_NUDGE | 746 | vector[6] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD_NUDGE |
766 | vector[7] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK_NUDGE | 747 | vector[7] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK_NUDGE |
767 | vector[8] = Vector3.UnitY; //LEFT_NUDGE | 748 | vector[8] = Vector3.UnitY; //LEFT_NUDGE |
768 | vector[9] = -Vector3.UnitY; //RIGHT_NUDGE | 749 | vector[9] = -Vector3.UnitY; //RIGHT_NUDGE |
769 | vector[10] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN_NUDGE | 750 | vector[10] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN_NUDGE |
770 | ======= | ||
771 | vector[8] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN_Nudge | ||
772 | vector[6] = (new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z) * 2); //FORWARD Nudge | ||
773 | vector[7] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK Nudge | ||
774 | >>>>>>> master:OpenSim/Region/Framework/Scenes/ScenePresence.cs | ||
775 | return vector; | 751 | return vector; |
776 | } | 752 | } |
777 | 753 | ||
@@ -1387,18 +1363,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
1387 | else | 1363 | else |
1388 | dirVectors = Dir_Vectors; | 1364 | dirVectors = Dir_Vectors; |
1389 | 1365 | ||
1390 | <<<<<<< HEAD:OpenSim/Region/Framework/Scenes/ScenePresence.cs | ||
1391 | bool[] isNudge = GetDirectionIsNudge(); | 1366 | bool[] isNudge = GetDirectionIsNudge(); |
1392 | 1367 | ||
1393 | 1368 | ||
1394 | 1369 | ||
1395 | 1370 | ||
1396 | 1371 | ||
1397 | ======= | ||
1398 | // The fact that m_movementflag is a byte needs to be fixed | ||
1399 | // it really should be a uint | ||
1400 | uint nudgehack = 250; | ||
1401 | >>>>>>> master:OpenSim/Region/Framework/Scenes/ScenePresence.cs | ||
1402 | foreach (Dir_ControlFlags DCF in DIR_CONTROL_FLAGS) | 1372 | foreach (Dir_ControlFlags DCF in DIR_CONTROL_FLAGS) |
1403 | { | 1373 | { |
1404 | if (((uint)flags & (uint)DCF) != 0) | 1374 | if (((uint)flags & (uint)DCF) != 0) |
@@ -1408,47 +1378,28 @@ namespace OpenSim.Region.Framework.Scenes | |||
1408 | try | 1378 | try |
1409 | { | 1379 | { |
1410 | agent_control_v3 += dirVectors[i]; | 1380 | agent_control_v3 += dirVectors[i]; |
1411 | <<<<<<< HEAD:OpenSim/Region/Framework/Scenes/ScenePresence.cs | ||
1412 | if (isNudge[i] == false) | 1381 | if (isNudge[i] == false) |
1413 | { | 1382 | { |
1414 | Nudging = false; | 1383 | Nudging = false; |
1415 | } | 1384 | } |
1416 | ======= | ||
1417 | //m_log.DebugFormat("[Motion]: {0}, {1}",i, dirVectors[i]); | ||
1418 | >>>>>>> master:OpenSim/Region/Framework/Scenes/ScenePresence.cs | ||
1419 | } | 1385 | } |
1420 | catch (IndexOutOfRangeException) | 1386 | catch (IndexOutOfRangeException) |
1421 | { | 1387 | { |
1422 | // Why did I get this? | 1388 | // Why did I get this? |
1423 | } | 1389 | } |
1424 | 1390 | ||
1425 | if ((m_movementflag & (byte)(uint)DCF) == 0) | 1391 | if ((m_movementflag & (uint)DCF) == 0) |
1426 | { | 1392 | { |
1427 | if (DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD_NUDGE || DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_BACKWARD_NUDGE) | ||
1428 | { | ||
1429 | m_movementflag |= (byte)nudgehack; | ||
1430 | } | ||
1431 | m_movementflag += (byte)(uint)DCF; | 1393 | m_movementflag += (byte)(uint)DCF; |
1432 | update_movementflag = true; | 1394 | update_movementflag = true; |
1433 | } | 1395 | } |
1434 | } | 1396 | } |
1435 | else | 1397 | else |
1436 | { | 1398 | { |
1437 | if ((m_movementflag & (byte)(uint)DCF) != 0 || | 1399 | if ((m_movementflag & (uint)DCF) != 0) |
1438 | ((DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD_NUDGE || DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_BACKWARD_NUDGE) | ||
1439 | && ((m_movementflag & (byte)nudgehack) == nudgehack)) | ||
1440 | ) // This or is for Nudge forward | ||
1441 | { | 1400 | { |
1442 | m_movementflag -= ((byte)(uint)DCF); | 1401 | m_movementflag -= (byte)(uint)DCF; |
1443 | |||
1444 | update_movementflag = true; | 1402 | update_movementflag = true; |
1445 | /* | ||
1446 | if ((DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD_NUDGE || DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_BACKWARD_NUDGE) | ||
1447 | && ((m_movementflag & (byte)nudgehack) == nudgehack)) | ||
1448 | { | ||
1449 | m_log.Debug("Removed Hack flag"); | ||
1450 | } | ||
1451 | */ | ||
1452 | } | 1403 | } |
1453 | else | 1404 | else |
1454 | { | 1405 | { |
@@ -1589,7 +1540,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1589 | } | 1540 | } |
1590 | } | 1541 | } |
1591 | 1542 | ||
1592 | if (update_movementflag && ((flags & AgentManager.ControlFlags.AGENT_CONTROL_SIT_ON_GROUND) == 0) && (m_parentID == 0)) | 1543 | if (update_movementflag) |
1593 | Animator.UpdateMovementAnimations(); | 1544 | Animator.UpdateMovementAnimations(); |
1594 | 1545 | ||
1595 | m_scene.EventManager.TriggerOnClientMovement(this); | 1546 | m_scene.EventManager.TriggerOnClientMovement(this); |