aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs38
1 files changed, 28 insertions, 10 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
index 32eb200..5ceab0a 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
@@ -500,16 +500,33 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
500 internal void ExecuteEvent(uint localID, UUID itemID, 500 internal void ExecuteEvent(uint localID, UUID itemID,
501 string FunctionName, DetectParams[] qParams, object[] args) 501 string FunctionName, DetectParams[] qParams, object[] args)
502 { 502 {
503 InstanceData id = GetScript(localID, itemID); 503 int ExeStage=0; // ;^) Ewe Loon, for debuging
504 if (id == null) 504 InstanceData id=null;
505 return; 505 try // ;^) Ewe Loon,fix
506 506 { // ;^) Ewe Loon,fix
507 detparms[id] = qParams; 507 ExeStage = 1; // ;^) Ewe Loon, for debuging
508 508 id = GetScript(localID, itemID);
509 if (id.Running) 509 if (id == null)
510 id.Script.ExecuteEvent(id.State, FunctionName, args); 510 return;
511 511 ExeStage = 2; // ;^) Ewe Loon, for debuging
512 detparms.Remove(id); 512 if (qParams.Length>0) // ;^) Ewe Loon,fix
513 detparms[id] = qParams;
514 ExeStage = 3; // ;^) Ewe Loon, for debuging
515 if (id.Running)
516 id.Script.ExecuteEvent(id.State, FunctionName, args);
517 ExeStage = 4; // ;^) Ewe Loon, for debuging
518 if (qParams.Length>0) // ;^) Ewe Loon,fix
519 detparms.Remove(id);
520 ExeStage = 5; // ;^) Ewe Loon, for debuging
521 }
522 catch (Exception e) // ;^) Ewe Loon, From here down tis fix
523 {
524 if ((ExeStage == 3)&&(qParams.Length>0))
525 detparms.Remove(id);
526 SceneObjectPart ob = m_scriptEngine.World.GetSceneObjectPart(localID);
527 m_log.InfoFormat("[Script Error] ,{0},{1},@{2},{3},{4},{5}", ob.Name , FunctionName, ExeStage, e.Message, qParams.Length, detparms.Count);
528 if (ExeStage != 2) throw e;
529 }
513 } 530 }
514 531
515 public uint GetLocalID(UUID itemID) 532 public uint GetLocalID(UUID itemID)
@@ -569,6 +586,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
569 586
570 Dictionary<UUID, InstanceData> Obj; 587 Dictionary<UUID, InstanceData> Obj;
571 Scripts.TryGetValue(localID, out Obj); 588 Scripts.TryGetValue(localID, out Obj);
589 if (Obj==null) return null;
572 if (Obj.ContainsKey(itemID) == false) 590 if (Obj.ContainsKey(itemID) == false)
573 return null; 591 return null;
574 592