Add a method to init the OSSL Api's m_LSL_Api member back to the OSSL Api

arthursv
Melanie 2009-08-07 19:50:47 +01:00
parent 3219e648cc
commit 178b40971a
2 changed files with 12 additions and 1 deletions

View File

@ -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;
}

View File

@ -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.
//