aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs25
1 files changed, 16 insertions, 9 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
index 4e781e6..016d045 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
@@ -38,16 +38,14 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
38{ 38{
39 public class ScriptManager : Common.ScriptEngineBase.ScriptManager 39 public class ScriptManager : Common.ScriptEngineBase.ScriptManager
40 { 40 {
41 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
42
41 public ScriptManager(Common.ScriptEngineBase.ScriptEngine scriptEngine) 43 public ScriptManager(Common.ScriptEngineBase.ScriptEngine scriptEngine)
42 : base(scriptEngine) 44 : base(scriptEngine)
43 { 45 {
44 base.m_scriptEngine = scriptEngine; 46 base.m_scriptEngine = scriptEngine;
45 } 47 }
46 private Compiler.LSL.Compiler LSLCompiler; 48 private Compiler.LSL.Compiler LSLCompiler;
47
48 private static readonly ILog m_log
49 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
50
51 49
52 public override void Initialize() 50 public override void Initialize()
53 { 51 {
@@ -64,8 +62,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
64 62
65 public override void _StartScript(uint localID, LLUUID itemID, string Script, int startParam, bool postOnRez) 63 public override void _StartScript(uint localID, LLUUID itemID, string Script, int startParam, bool postOnRez)
66 { 64 {
67 m_scriptEngine.Log.Debug("[" + m_scriptEngine.ScriptEngineName + "]: ScriptManager StartScript: localID: " + localID + ", itemID: " + itemID); 65 m_log.DebugFormat(
68 66 "[{0}]: ScriptManager StartScript: localID: {1}, itemID: {2}",
67 m_scriptEngine.ScriptEngineName, localID, itemID);
69 68
70 //IScriptHost root = host.GetRoot(); 69 //IScriptHost root = host.GetRoot();
71 70
@@ -74,14 +73,22 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
74 string CompiledScriptFile = String.Empty; 73 string CompiledScriptFile = String.Empty;
75 74
76 SceneObjectPart m_host = World.GetSceneObjectPart(localID); 75 SceneObjectPart m_host = World.GetSceneObjectPart(localID);
76
77 if (null == m_host)
78 {
79 m_log.ErrorFormat(
80 "[{0}]: Could not get scene object part corresponding to localID {1} to start script",
81 m_scriptEngine.ScriptEngineName, localID);
82
83 return;
84 }
77 85
78 // Xantor 20080525: I need assetID here to see if we already compiled this one previously 86 // Xantor 20080525: I need assetID here to see if we already compiled this one previously
79 LLUUID assetID = LLUUID.Zero; 87 LLUUID assetID = LLUUID.Zero;
80 TaskInventoryItem taskInventoryItem = new TaskInventoryItem(); 88 TaskInventoryItem taskInventoryItem = new TaskInventoryItem();
81 if (m_host.TaskInventory.TryGetValue(itemID,out taskInventoryItem)) 89 if (m_host.TaskInventory.TryGetValue(itemID, out taskInventoryItem))
82 assetID = taskInventoryItem.AssetID; 90 assetID = taskInventoryItem.AssetID;
83 91
84
85 try 92 try
86 { 93 {
87 // Xantor 20080525 see if we already compiled this script this session, stop incessant recompiling on 94 // Xantor 20080525 see if we already compiled this script this session, stop incessant recompiling on