diff options
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index f1e27a5..7a14f2a 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -5751,29 +5751,21 @@ namespace OpenSim.Region.Framework.Scenes | |||
5751 | if (scriptedcontrols.Count <= 0) | 5751 | if (scriptedcontrols.Count <= 0) |
5752 | return; | 5752 | return; |
5753 | 5753 | ||
5754 | ScriptControlled allflags = ScriptControlled.CONTROL_ZERO; | 5754 | ScriptControlled allflags; |
5755 | 5755 | // convert mouse from edge to level | |
5756 | if (MouseDown) | 5756 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_UP) != 0 || |
5757 | (flags & unchecked((uint)AgentManager.ControlFlags.AGENT_CONTROL_ML_LBUTTON_UP)) != 0) | ||
5757 | { | 5758 | { |
5758 | allflags = LastCommands & (ScriptControlled.CONTROL_ML_LBUTTON | ScriptControlled.CONTROL_LBUTTON); | 5759 | allflags = ScriptControlled.CONTROL_ZERO; |
5759 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_UP) != 0 || (flags & unchecked((uint)AgentManager.ControlFlags.AGENT_CONTROL_ML_LBUTTON_UP)) != 0) | ||
5760 | { | ||
5761 | allflags = ScriptControlled.CONTROL_ZERO; | ||
5762 | MouseDown = true; | ||
5763 | } | ||
5764 | } | 5760 | } |
5761 | else // recover last state of mouse | ||
5762 | allflags = LastCommands & (ScriptControlled.CONTROL_ML_LBUTTON | ScriptControlled.CONTROL_LBUTTON); | ||
5765 | 5763 | ||
5766 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_ML_LBUTTON_DOWN) != 0) | 5764 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_ML_LBUTTON_DOWN) != 0) |
5767 | { | ||
5768 | allflags |= ScriptControlled.CONTROL_ML_LBUTTON; | 5765 | allflags |= ScriptControlled.CONTROL_ML_LBUTTON; |
5769 | MouseDown = true; | ||
5770 | } | ||
5771 | 5766 | ||
5772 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0) | 5767 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0) |
5773 | { | ||
5774 | allflags |= ScriptControlled.CONTROL_LBUTTON; | 5768 | allflags |= ScriptControlled.CONTROL_LBUTTON; |
5775 | MouseDown = true; | ||
5776 | } | ||
5777 | 5769 | ||
5778 | // find all activated controls, whether the scripts are interested in them or not | 5770 | // find all activated controls, whether the scripts are interested in them or not |
5779 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS) != 0) | 5771 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS) != 0) |
@@ -5837,6 +5829,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5837 | } | 5829 | } |
5838 | 5830 | ||
5839 | LastCommands = allflags; | 5831 | LastCommands = allflags; |
5832 | MouseDown = (allflags & (ScriptControlled.CONTROL_ML_LBUTTON | ScriptControlled.CONTROL_LBUTTON)) != 0; | ||
5840 | } | 5833 | } |
5841 | } | 5834 | } |
5842 | 5835 | ||