From 178b40971a401307a827bc95abbe8d9d69566825 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 7 Aug 2009 19:50:47 +0100 Subject: Add a method to init the OSSL Api's m_LSL_Api member back to the OSSL Api --- OpenSim/Framework/Util.cs | 3 +++ .../Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 65d4f4d..003c543 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -1155,7 +1155,10 @@ namespace OpenSim.Framework string[] files = Directory.GetFiles(p, c); foreach (string f in files) + { + m_log.InfoFormat("Adding file {0} to include list", f); found.Add(f); + } } paths = addpaths; } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 7c878b8..967b835 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -105,7 +105,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public class OSSL_Api : MarshalByRefObject, IOSSL_Api, IScriptApi { internal IScriptEngine m_ScriptEngine; - internal ILSL_Api m_LSL_Api; // get a reference to the LSL API so we can call methods housed there + internal ILSL_Api m_LSL_Api = null; // get a reference to the LSL API so we can call methods housed there internal SceneObjectPart m_host; internal uint m_localID; internal UUID m_itemID; @@ -183,6 +183,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api throw new Exception("OSSL Runtime Error: " + msg); } + private void InitLSL() + { + if (m_LSL_Api != null) + return; + + m_LSL_Api = (ILSL_Api)m_ScriptEngine.GetApi(m_itemID, "LSL"); + } + // //Dumps an error message on the debug console. // -- cgit v1.1