change ossl error report and NPC create error handling
parent
8b5b251d1a
commit
05b79e203d
|
@ -141,7 +141,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
internal ThreatLevel m_MaxThreatLevel = ThreatLevel.VeryLow;
|
internal ThreatLevel m_MaxThreatLevel = ThreatLevel.VeryLow;
|
||||||
internal float m_ScriptDelayFactor = 1.0f;
|
internal float m_ScriptDelayFactor = 1.0f;
|
||||||
internal float m_ScriptDistanceFactor = 1.0f;
|
internal float m_ScriptDistanceFactor = 1.0f;
|
||||||
internal bool m_debuggerSafe = false;
|
internal bool m_debuggerSafe = true;
|
||||||
internal Dictionary<string, FunctionPerms > m_FunctionPerms = new Dictionary<string, FunctionPerms >();
|
internal Dictionary<string, FunctionPerms > m_FunctionPerms = new Dictionary<string, FunctionPerms >();
|
||||||
protected IUrlModule m_UrlModule = null;
|
protected IUrlModule m_UrlModule = null;
|
||||||
protected ISoundModule m_SoundModule = null;
|
protected ISoundModule m_SoundModule = null;
|
||||||
|
@ -158,7 +158,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
if(m_osslconfig == null)
|
if(m_osslconfig == null)
|
||||||
m_osslconfig = m_ScriptEngine.Config;
|
m_osslconfig = m_ScriptEngine.Config;
|
||||||
|
|
||||||
m_debuggerSafe = m_ScriptEngine.Config.GetBoolean("DebuggerSafe", false);
|
m_debuggerSafe = m_ScriptEngine.Config.GetBoolean("DebuggerSafe", m_debuggerSafe);
|
||||||
|
|
||||||
m_UrlModule = m_ScriptEngine.World.RequestModuleInterface<IUrlModule>();
|
m_UrlModule = m_ScriptEngine.World.RequestModuleInterface<IUrlModule>();
|
||||||
m_SoundModule = m_ScriptEngine.World.RequestModuleInterface<ISoundModule>();
|
m_SoundModule = m_ScriptEngine.World.RequestModuleInterface<ISoundModule>();
|
||||||
|
@ -2970,10 +2970,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
if (appearance == null)
|
if (appearance == null)
|
||||||
{
|
{
|
||||||
string appearanceSerialized = LoadNotecard(notecard);
|
if(!string.IsNullOrWhiteSpace(notecard))
|
||||||
|
|
||||||
if (appearanceSerialized != null)
|
|
||||||
{
|
{
|
||||||
|
string appearanceSerialized = LoadNotecard(notecard);
|
||||||
|
if (appearanceSerialized == null)
|
||||||
|
{
|
||||||
|
OSSLError(string.Format("osNpcCreate: Notecard '{0}' not found.", notecard));
|
||||||
|
return new LSL_Key(UUID.Zero.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
OSDMap appearanceOsd = (OSDMap)OSDParser.DeserializeLLSDXml(appearanceSerialized);
|
OSDMap appearanceOsd = (OSDMap)OSDParser.DeserializeLLSDXml(appearanceSerialized);
|
||||||
|
@ -2982,14 +2987,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
OSSLError(string.Format("osNpcCreate: Error processing notcard '{0}'", notecard));
|
OSSLError(string.Format("osNpcCreate: Error processing notecard '{0}'", notecard));
|
||||||
return new LSL_Key(UUID.Zero.ToString());
|
return new LSL_Key(UUID.Zero.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
OSSLError(string.Format("osNpcCreate: Notecard reference '{0}' not found.", notecard));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UUID ownerID = UUID.Zero;
|
UUID ownerID = UUID.Zero;
|
||||||
|
|
Loading…
Reference in New Issue