diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/EventManager.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 9 |
2 files changed, 9 insertions, 7 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) }, |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 6dd94bb..c552b92 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -806,12 +806,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
806 | instance.ClearQueue(); | 806 | instance.ClearQueue(); |
807 | instance.Stop(0); | 807 | instance.Stop(0); |
808 | 808 | ||
809 | SceneObjectPart part = | ||
810 | m_Scene.GetSceneObjectPart(localID); | ||
811 | |||
812 | if (part != null) | ||
813 | part.RemoveScriptEvents(itemID); | ||
814 | |||
815 | // bool objectRemoved = false; | 809 | // bool objectRemoved = false; |
816 | 810 | ||
817 | lock (m_PrimObjects) | 811 | lock (m_PrimObjects) |
@@ -846,7 +840,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
846 | 840 | ||
847 | ObjectRemoved handlerObjectRemoved = OnObjectRemoved; | 841 | ObjectRemoved handlerObjectRemoved = OnObjectRemoved; |
848 | if (handlerObjectRemoved != null) | 842 | if (handlerObjectRemoved != null) |
843 | { | ||
844 | SceneObjectPart part = m_Scene.GetSceneObjectPart(localID); | ||
849 | handlerObjectRemoved(part.UUID); | 845 | handlerObjectRemoved(part.UUID); |
846 | } | ||
850 | 847 | ||
851 | CleanAssemblies(); | 848 | CleanAssemblies(); |
852 | } | 849 | } |