aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/XEngine.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs28
1 files changed, 9 insertions, 19 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index ec35fde..452c443 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -551,7 +551,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
551 /// <param name="instance"></param> 551 /// <param name="instance"></param>
552 /// <param name="keySelector">Basis on which to sort output. Can be null if no sort needs to take place</param> 552 /// <param name="keySelector">Basis on which to sort output. Can be null if no sort needs to take place</param>
553 private void HandleScriptsAction<TKey>( 553 private void HandleScriptsAction<TKey>(
554 string[] cmdparams, Action<IScriptInstance> action, Func<IScriptInstance, TKey> keySelector) 554 string[] cmdparams, Action<IScriptInstance> action, System.Func<IScriptInstance, TKey> keySelector)
555 { 555 {
556 if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_Scene)) 556 if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_Scene))
557 return; 557 return;
@@ -609,7 +609,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
609 if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_Scene)) 609 if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_Scene))
610 return; 610 return;
611 611
612 MainConsole.Instance.OutputFormat(GetStatusReport()); 612 MainConsole.Instance.Output(GetStatusReport());
613 } 613 }
614 614
615 public string GetStatusReport() 615 public string GetStatusReport()
@@ -708,7 +708,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
708 sb.AppendFormat("Containing part UUID: {0}\n", instance.ObjectID); 708 sb.AppendFormat("Containing part UUID: {0}\n", instance.ObjectID);
709 sb.AppendFormat("Position : {0}\n", sop.AbsolutePosition); 709 sb.AppendFormat("Position : {0}\n", sop.AbsolutePosition);
710 710
711 MainConsole.Instance.OutputFormat(sb.ToString()); 711 MainConsole.Instance.Output(sb.ToString());
712 } 712 }
713 713
714 private void HandleSuspendScript(IScriptInstance instance) 714 private void HandleSuspendScript(IScriptInstance instance)
@@ -1632,7 +1632,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1632 startInfo.MaxWorkerThreads = maxThreads; 1632 startInfo.MaxWorkerThreads = maxThreads;
1633 startInfo.MinWorkerThreads = minThreads; 1633 startInfo.MinWorkerThreads = minThreads;
1634 startInfo.ThreadPriority = threadPriority;; 1634 startInfo.ThreadPriority = threadPriority;;
1635 startInfo.StackSize = stackSize; 1635 startInfo.MaxStackSize = stackSize;
1636 startInfo.StartSuspended = true; 1636 startInfo.StartSuspended = true;
1637 1637
1638 m_ThreadPool = new SmartThreadPool(startInfo); 1638 m_ThreadPool = new SmartThreadPool(startInfo);
@@ -1826,9 +1826,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1826 public bool GetScriptState(UUID itemID) 1826 public bool GetScriptState(UUID itemID)
1827 { 1827 {
1828 IScriptInstance instance = GetInstance(itemID); 1828 IScriptInstance instance = GetInstance(itemID);
1829 if (instance != null) 1829 return instance != null && instance.Running;
1830 return instance.Running;
1831 return false;
1832 } 1830 }
1833 1831
1834 [DebuggerNonUserCode] 1832 [DebuggerNonUserCode]
@@ -1873,9 +1871,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1873 public DetectParams GetDetectParams(UUID itemID, int idx) 1871 public DetectParams GetDetectParams(UUID itemID, int idx)
1874 { 1872 {
1875 IScriptInstance instance = GetInstance(itemID); 1873 IScriptInstance instance = GetInstance(itemID);
1876 if (instance != null) 1874 return instance != null ? instance.GetDetectParams(idx) : null;
1877 return instance.GetDetectParams(idx);
1878 return null;
1879 } 1875 }
1880 1876
1881 public void SetMinEventDelay(UUID itemID, double delay) 1877 public void SetMinEventDelay(UUID itemID, double delay)
@@ -1888,9 +1884,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1888 public UUID GetDetectID(UUID itemID, int idx) 1884 public UUID GetDetectID(UUID itemID, int idx)
1889 { 1885 {
1890 IScriptInstance instance = GetInstance(itemID); 1886 IScriptInstance instance = GetInstance(itemID);
1891 if (instance != null) 1887 return instance != null ? instance.GetDetectID(idx) : UUID.Zero;
1892 return instance.GetDetectID(idx);
1893 return UUID.Zero;
1894 } 1888 }
1895 1889
1896 [DebuggerNonUserCode] 1890 [DebuggerNonUserCode]
@@ -1905,9 +1899,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1905 public int GetStartParameter(UUID itemID) 1899 public int GetStartParameter(UUID itemID)
1906 { 1900 {
1907 IScriptInstance instance = GetInstance(itemID); 1901 IScriptInstance instance = GetInstance(itemID);
1908 if (instance == null) 1902 return instance == null ? 0 : instance.StartParam;
1909 return 0;
1910 return instance.StartParam;
1911 } 1903 }
1912 1904
1913 public void OnShutdown() 1905 public void OnShutdown()
@@ -1940,9 +1932,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1940 public IScriptApi GetApi(UUID itemID, string name) 1932 public IScriptApi GetApi(UUID itemID, string name)
1941 { 1933 {
1942 IScriptInstance instance = GetInstance(itemID); 1934 IScriptInstance instance = GetInstance(itemID);
1943 if (instance == null) 1935 return instance == null ? null : instance.GetApi(name);
1944 return null;
1945 return instance.GetApi(name);
1946 } 1936 }
1947 1937
1948 public void OnGetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID) 1938 public void OnGetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID)