diff options
author | root | 2009-11-26 20:41:38 +0100 |
---|---|---|
committer | root | 2009-11-26 20:41:38 +0100 |
commit | 2c3f6aaa878b5458eeeab8544226ff53b7172f5a (patch) | |
tree | 48941505962693508016fafb479c2baaf1b3568f /OpenSim/Region/Framework/Scenes/ScenePresence.cs | |
parent | First attempt at mult-sit on large single prims. (diff) | |
parent | Remove OS version crap from about dialog (diff) | |
download | opensim-SC-2c3f6aaa878b5458eeeab8544226ff53b7172f5a.zip opensim-SC-2c3f6aaa878b5458eeeab8544226ff53b7172f5a.tar.gz opensim-SC-2c3f6aaa878b5458eeeab8544226ff53b7172f5a.tar.bz2 opensim-SC-2c3f6aaa878b5458eeeab8544226ff53b7172f5a.tar.xz |
Merge branch 'careminster' into tests
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index e677cfd..cebd108 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -171,7 +171,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
171 | protected RegionInfo m_regionInfo; | 171 | protected RegionInfo m_regionInfo; |
172 | protected ulong crossingFromRegion; | 172 | protected ulong crossingFromRegion; |
173 | 173 | ||
174 | private readonly Vector3[] Dir_Vectors = new Vector3[9]; | 174 | private readonly Vector3[] Dir_Vectors = new Vector3[11]; |
175 | private bool m_isNudging = false; | 175 | private bool m_isNudging = false; |
176 | 176 | ||
177 | // Position of agent's camera in world (region cordinates) | 177 | // Position of agent's camera in world (region cordinates) |
@@ -241,6 +241,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
241 | DIR_CONTROL_FLAG_DOWN = AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG, | 241 | DIR_CONTROL_FLAG_DOWN = AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG, |
242 | DIR_CONTROL_FLAG_FORWARD_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS, | 242 | DIR_CONTROL_FLAG_FORWARD_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS, |
243 | DIR_CONTROL_FLAG_BACK_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG, | 243 | DIR_CONTROL_FLAG_BACK_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG, |
244 | DIR_CONTROL_FLAG_LEFT_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_POS, | ||
245 | DIR_CONTROL_FLAG_RIGHT_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG, | ||
244 | DIR_CONTROL_FLAG_DOWN_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG | 246 | DIR_CONTROL_FLAG_DOWN_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG |
245 | } | 247 | } |
246 | 248 | ||
@@ -725,12 +727,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
725 | Dir_Vectors[5] = -Vector3.UnitZ; //DOWN | 727 | Dir_Vectors[5] = -Vector3.UnitZ; //DOWN |
726 | Dir_Vectors[6] = new Vector3(0.5f, 0f, 0f); //FORWARD_NUDGE | 728 | Dir_Vectors[6] = new Vector3(0.5f, 0f, 0f); //FORWARD_NUDGE |
727 | Dir_Vectors[7] = new Vector3(-0.5f, 0f, 0f); //BACK_NUDGE | 729 | Dir_Vectors[7] = new Vector3(-0.5f, 0f, 0f); //BACK_NUDGE |
728 | Dir_Vectors[8] = new Vector3(0f, 0f, -0.5f); //DOWN_Nudge | 730 | Dir_Vectors[8] = new Vector3(0f, 0.5f, 0f); //LEFT_NUDGE |
731 | Dir_Vectors[9] = new Vector3(0f, -0.5f, 0f); //RIGHT_NUDGE | ||
732 | Dir_Vectors[10] = new Vector3(0f, 0f, -0.5f); //DOWN_Nudge | ||
729 | } | 733 | } |
730 | 734 | ||
731 | private Vector3[] GetWalkDirectionVectors() | 735 | private Vector3[] GetWalkDirectionVectors() |
732 | { | 736 | { |
733 | Vector3[] vector = new Vector3[9]; | 737 | Vector3[] vector = new Vector3[11]; |
734 | vector[0] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD | 738 | vector[0] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD |
735 | vector[1] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK | 739 | vector[1] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK |
736 | vector[2] = Vector3.UnitY; //LEFT | 740 | vector[2] = Vector3.UnitY; //LEFT |
@@ -739,13 +743,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
739 | vector[5] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN | 743 | vector[5] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN |
740 | vector[6] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD_NUDGE | 744 | vector[6] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD_NUDGE |
741 | vector[7] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK_NUDGE | 745 | vector[7] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK_NUDGE |
742 | vector[8] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN_Nudge | 746 | vector[8] = Vector3.UnitY; //LEFT_NUDGE |
747 | vector[9] = -Vector3.UnitY; //RIGHT_NUDGE | ||
748 | vector[10] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN_NUDGE | ||
743 | return vector; | 749 | return vector; |
744 | } | 750 | } |
745 | 751 | ||
746 | private bool[] GetDirectionIsNudge() | 752 | private bool[] GetDirectionIsNudge() |
747 | { | 753 | { |
748 | bool[] isNudge = new bool[9]; | 754 | bool[] isNudge = new bool[11]; |
749 | isNudge[0] = false; //FORWARD | 755 | isNudge[0] = false; //FORWARD |
750 | isNudge[1] = false; //BACK | 756 | isNudge[1] = false; //BACK |
751 | isNudge[2] = false; //LEFT | 757 | isNudge[2] = false; //LEFT |
@@ -754,7 +760,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
754 | isNudge[5] = false; //DOWN | 760 | isNudge[5] = false; //DOWN |
755 | isNudge[6] = true; //FORWARD_NUDGE | 761 | isNudge[6] = true; //FORWARD_NUDGE |
756 | isNudge[7] = true; //BACK_NUDGE | 762 | isNudge[7] = true; //BACK_NUDGE |
757 | isNudge[8] = true; //DOWN_Nudge | 763 | isNudge[8] = true; //LEFT_NUDGE |
764 | isNudge[9] = true; //RIGHT_NUDGE | ||
765 | isNudge[10] = true; //DOWN_Nudge | ||
758 | return isNudge; | 766 | return isNudge; |
759 | } | 767 | } |
760 | 768 | ||
@@ -1618,21 +1626,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
1618 | SceneObjectPart part = m_scene.GetSceneObjectPart(m_parentID); | 1626 | SceneObjectPart part = m_scene.GetSceneObjectPart(m_parentID); |
1619 | if (part != null) | 1627 | if (part != null) |
1620 | { | 1628 | { |
1629 | part.TaskInventory.LockItemsForRead(true); | ||
1621 | TaskInventoryDictionary taskIDict = part.TaskInventory; | 1630 | TaskInventoryDictionary taskIDict = part.TaskInventory; |
1622 | if (taskIDict != null) | 1631 | if (taskIDict != null) |
1623 | { | 1632 | { |
1624 | lock (taskIDict) | 1633 | foreach (UUID taskID in taskIDict.Keys) |
1625 | { | 1634 | { |
1626 | foreach (UUID taskID in taskIDict.Keys) | 1635 | UnRegisterControlEventsToScript(LocalId, taskID); |
1627 | { | 1636 | taskIDict[taskID].PermsMask &= ~( |
1628 | UnRegisterControlEventsToScript(LocalId, taskID); | 1637 | 2048 | //PERMISSION_CONTROL_CAMERA |
1629 | taskIDict[taskID].PermsMask &= ~( | 1638 | 4); // PERMISSION_TAKE_CONTROLS |
1630 | 2048 | //PERMISSION_CONTROL_CAMERA | ||
1631 | 4); // PERMISSION_TAKE_CONTROLS | ||
1632 | } | ||
1633 | } | 1639 | } |
1634 | |||
1635 | } | 1640 | } |
1641 | part.TaskInventory.LockItemsForRead(false); | ||
1636 | // Reset sit target. | 1642 | // Reset sit target. |
1637 | if (part.GetAvatarOnSitTarget() == UUID) | 1643 | if (part.GetAvatarOnSitTarget() == UUID) |
1638 | part.SetAvatarOnSitTarget(UUID.Zero); | 1644 | part.SetAvatarOnSitTarget(UUID.Zero); |