aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-01-29 23:12:08 +0000
committerJustin Clark-Casey (justincc)2010-01-29 23:12:08 +0000
commit05a3e37b853fc870b83eb67b47bc70eb724f652e (patch)
tree8fddceb9442ed0352c1b5f04a79ee2242bd4d6d1 /OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
parentApply http://opensimulator.org/mantis/view.php?id=4548 (diff)
downloadopensim-SC-05a3e37b853fc870b83eb67b47bc70eb724f652e.zip
opensim-SC-05a3e37b853fc870b83eb67b47bc70eb724f652e.tar.gz
opensim-SC-05a3e37b853fc870b83eb67b47bc70eb724f652e.tar.bz2
opensim-SC-05a3e37b853fc870b83eb67b47bc70eb724f652e.tar.xz
Apply http://opensimulator.org/mantis/view.php?id=3334
Send continuous touch() events if the left mouse button is held down while moving over an object This conforms with Linden Lab practice Thanks Revolution
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/EventManager.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
index 16309ef..09b79d0 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
@@ -55,6 +55,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
55 m_log.Info("[XEngine] Hooking up to server events"); 55 m_log.Info("[XEngine] Hooking up to server events");
56 myScriptEngine.World.EventManager.OnAttach += attach; 56 myScriptEngine.World.EventManager.OnAttach += attach;
57 myScriptEngine.World.EventManager.OnObjectGrab += touch_start; 57 myScriptEngine.World.EventManager.OnObjectGrab += touch_start;
58 myScriptEngine.World.EventManager.OnObjectGrabbing += touch;
58 myScriptEngine.World.EventManager.OnObjectDeGrab += touch_end; 59 myScriptEngine.World.EventManager.OnObjectDeGrab += touch_end;
59 myScriptEngine.World.EventManager.OnScriptChangedEvent += changed; 60 myScriptEngine.World.EventManager.OnScriptChangedEvent += changed;
60 myScriptEngine.World.EventManager.OnScriptAtTargetEvent += at_target; 61 myScriptEngine.World.EventManager.OnScriptAtTargetEvent += at_target;
@@ -148,7 +149,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
148 } 149 }
149 150
150 public void touch(uint localID, uint originalID, Vector3 offsetPos, 151 public void touch(uint localID, uint originalID, Vector3 offsetPos,
151 IClientAPI remoteClient) 152 IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs)
152 { 153 {
153 // Add to queue for all scripts in ObjectID object 154 // Add to queue for all scripts in ObjectID object
154 DetectParams[] det = new DetectParams[1]; 155 DetectParams[] det = new DetectParams[1];
@@ -172,6 +173,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
172 SceneObjectPart originalPart = myScriptEngine.World.GetSceneObjectPart(originalID); 173 SceneObjectPart originalPart = myScriptEngine.World.GetSceneObjectPart(originalID);
173 det[0].LinkNum = originalPart.LinkNum; 174 det[0].LinkNum = originalPart.LinkNum;
174 } 175 }
176 if (surfaceArgs != null)
177 {
178 det[0].SurfaceTouchArgs = surfaceArgs;
179 }
175 180
176 myScriptEngine.PostObjectEvent(localID, new EventParams( 181 myScriptEngine.PostObjectEvent(localID, new EventParams(
177 "touch", new Object[] { new LSL_Types.LSLInteger(1) }, 182 "touch", new Object[] { new LSL_Types.LSLInteger(1) },