aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorCharles Krinke2008-05-26 16:16:48 +0000
committerCharles Krinke2008-05-26 16:16:48 +0000
commited717ec181ef9946fbb5182d59e9f051ae1478ac (patch)
treef5357655e40c618338756937fecd5092fbb1c656 /OpenSim/Region/Environment/Scenes
parentdisabling m_log again. (diff)
downloadopensim-SC-ed717ec181ef9946fbb5182d59e9f051ae1478ac.zip
opensim-SC-ed717ec181ef9946fbb5182d59e9f051ae1478ac.tar.gz
opensim-SC-ed717ec181ef9946fbb5182d59e9f051ae1478ac.tar.bz2
opensim-SC-ed717ec181ef9946fbb5182d59e9f051ae1478ac.tar.xz
Thank you kindly, Melanie for a patch for script reset
that creates the event handler chain ready to hook by script engines
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/EventManager.cs12
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs9
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs1
3 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/EventManager.cs b/OpenSim/Region/Environment/Scenes/EventManager.cs
index 6cecb6d..e77bebc 100644
--- a/OpenSim/Region/Environment/Scenes/EventManager.cs
+++ b/OpenSim/Region/Environment/Scenes/EventManager.cs
@@ -85,11 +85,13 @@ namespace OpenSim.Region.Environment.Scenes
85 85
86 public delegate void ObjectGrabDelegate(uint localID, LLVector3 offsetPos, IClientAPI remoteClient); 86 public delegate void ObjectGrabDelegate(uint localID, LLVector3 offsetPos, IClientAPI remoteClient);
87 public delegate void ObjectDeGrabDelegate(uint localID, IClientAPI remoteClient); 87 public delegate void ObjectDeGrabDelegate(uint localID, IClientAPI remoteClient);
88 public delegate void ScriptResetDelegate(uint localID, LLUUID itemID);
88 89
89 public delegate void OnPermissionErrorDelegate(LLUUID user, string reason); 90 public delegate void OnPermissionErrorDelegate(LLUUID user, string reason);
90 91
91 public event ObjectGrabDelegate OnObjectGrab; 92 public event ObjectGrabDelegate OnObjectGrab;
92 public event ObjectDeGrabDelegate OnObjectDeGrab; 93 public event ObjectDeGrabDelegate OnObjectDeGrab;
94 public event ScriptResetDelegate OnScriptReset;
93 95
94 public event OnPermissionErrorDelegate OnPermissionError; 96 public event OnPermissionErrorDelegate OnPermissionError;
95 97
@@ -310,6 +312,7 @@ namespace OpenSim.Region.Environment.Scenes
310 private OnShutdownDelegate handlerShutdown = null; //OnShutdown; 312 private OnShutdownDelegate handlerShutdown = null; //OnShutdown;
311 private ObjectGrabDelegate handlerObjectGrab = null; //OnObjectGrab; 313 private ObjectGrabDelegate handlerObjectGrab = null; //OnObjectGrab;
312 private ObjectDeGrabDelegate handlerObjectDeGrab = null; //OnObjectDeGrab; 314 private ObjectDeGrabDelegate handlerObjectDeGrab = null; //OnObjectDeGrab;
315 private ScriptResetDelegate handlerScriptReset = null; // OnScriptReset
313 private NewRezScript handlerRezScript = null; //OnRezScript; 316 private NewRezScript handlerRezScript = null; //OnRezScript;
314 private RemoveScript handlerRemoveScript = null; //OnRemoveScript; 317 private RemoveScript handlerRemoveScript = null; //OnRemoveScript;
315 private SceneGroupMoved handlerSceneGroupMove = null; //OnSceneGroupMove; 318 private SceneGroupMoved handlerSceneGroupMove = null; //OnSceneGroupMove;
@@ -484,6 +487,15 @@ namespace OpenSim.Region.Environment.Scenes
484 } 487 }
485 } 488 }
486 489
490 public void TriggerScriptReset(uint localID, LLUUID itemID)
491 {
492 handlerScriptReset = OnScriptReset;
493 if (handlerScriptReset != null)
494 {
495 handlerScriptReset(localID, itemID);
496 }
497 }
498
487 public void TriggerRezScript(uint localID, LLUUID itemID, string script) 499 public void TriggerRezScript(uint localID, LLUUID itemID, string script)
488 { 500 {
489 handlerRezScript = OnRezScript; 501 handlerRezScript = OnRezScript;
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index 8419399..41bd2d3 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -288,5 +288,14 @@ namespace OpenSim.Region.Environment.Scenes
288 } 288 }
289 client.SendAvatarPickerReply(agent_data, data_args); 289 client.SendAvatarPickerReply(agent_data, data_args);
290 } 290 }
291
292 public void ProcessScriptReset(IClientAPI remoteClient, LLUUID objectID,
293 LLUUID itemID)
294 {
295 SceneObjectPart part=GetSceneObjectPart(objectID);
296 if(part == null)
297 return;
298 EventManager.TriggerScriptReset(part.LocalId, itemID);
299 }
291 } 300 }
292} 301}
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 4d380f9..c9f23af 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1704,6 +1704,7 @@ namespace OpenSim.Region.Environment.Scenes
1704 client.OnUndo += m_innerScene.HandleUndo; 1704 client.OnUndo += m_innerScene.HandleUndo;
1705 client.OnObjectGroupRequest += m_innerScene.HandleObjectGroupUpdate; 1705 client.OnObjectGroupRequest += m_innerScene.HandleObjectGroupUpdate;
1706 client.OnParcelReturnObjectsRequest += LandChannel.ReturnObjectsInParcel; 1706 client.OnParcelReturnObjectsRequest += LandChannel.ReturnObjectsInParcel;
1707 client.OnScriptReset += ProcessScriptReset;
1707 1708
1708 // EventManager.TriggerOnNewClient(client); 1709 // EventManager.TriggerOnNewClient(client);
1709 } 1710 }