diff options
author | UbitUmarov | 2018-10-20 15:25:28 +0100 |
---|---|---|
committer | UbitUmarov | 2018-10-20 15:25:28 +0100 |
commit | 05b79e203d932ce45d19aeffa278e7548e746166 (patch) | |
tree | 046a627ab63b6e0d5ba4d6a068fcd499e2deacf0 /OpenSim/Region | |
parent | mantis 8398: fix with previus commits; removed redundante code (diff) | |
download | opensim-SC-05b79e203d932ce45d19aeffa278e7548e746166.zip opensim-SC-05b79e203d932ce45d19aeffa278e7548e746166.tar.gz opensim-SC-05b79e203d932ce45d19aeffa278e7548e746166.tar.bz2 opensim-SC-05b79e203d932ce45d19aeffa278e7548e746166.tar.xz |
change ossl error report and NPC create error handling
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 20ab7d2..4859038 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -141,7 +141,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
141 | internal ThreatLevel m_MaxThreatLevel = ThreatLevel.VeryLow; | 141 | internal ThreatLevel m_MaxThreatLevel = ThreatLevel.VeryLow; |
142 | internal float m_ScriptDelayFactor = 1.0f; | 142 | internal float m_ScriptDelayFactor = 1.0f; |
143 | internal float m_ScriptDistanceFactor = 1.0f; | 143 | internal float m_ScriptDistanceFactor = 1.0f; |
144 | internal bool m_debuggerSafe = false; | 144 | internal bool m_debuggerSafe = true; |
145 | internal Dictionary<string, FunctionPerms > m_FunctionPerms = new Dictionary<string, FunctionPerms >(); | 145 | internal Dictionary<string, FunctionPerms > m_FunctionPerms = new Dictionary<string, FunctionPerms >(); |
146 | protected IUrlModule m_UrlModule = null; | 146 | protected IUrlModule m_UrlModule = null; |
147 | protected ISoundModule m_SoundModule = null; | 147 | protected ISoundModule m_SoundModule = null; |
@@ -158,7 +158,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
158 | if(m_osslconfig == null) | 158 | if(m_osslconfig == null) |
159 | m_osslconfig = m_ScriptEngine.Config; | 159 | m_osslconfig = m_ScriptEngine.Config; |
160 | 160 | ||
161 | m_debuggerSafe = m_ScriptEngine.Config.GetBoolean("DebuggerSafe", false); | 161 | m_debuggerSafe = m_ScriptEngine.Config.GetBoolean("DebuggerSafe", m_debuggerSafe); |
162 | 162 | ||
163 | m_UrlModule = m_ScriptEngine.World.RequestModuleInterface<IUrlModule>(); | 163 | m_UrlModule = m_ScriptEngine.World.RequestModuleInterface<IUrlModule>(); |
164 | m_SoundModule = m_ScriptEngine.World.RequestModuleInterface<ISoundModule>(); | 164 | m_SoundModule = m_ScriptEngine.World.RequestModuleInterface<ISoundModule>(); |
@@ -2970,10 +2970,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2970 | 2970 | ||
2971 | if (appearance == null) | 2971 | if (appearance == null) |
2972 | { | 2972 | { |
2973 | string appearanceSerialized = LoadNotecard(notecard); | 2973 | if(!string.IsNullOrWhiteSpace(notecard)) |
2974 | |||
2975 | if (appearanceSerialized != null) | ||
2976 | { | 2974 | { |
2975 | string appearanceSerialized = LoadNotecard(notecard); | ||
2976 | if (appearanceSerialized == null) | ||
2977 | { | ||
2978 | OSSLError(string.Format("osNpcCreate: Notecard '{0}' not found.", notecard)); | ||
2979 | return new LSL_Key(UUID.Zero.ToString()); | ||
2980 | } | ||
2981 | |||
2977 | try | 2982 | try |
2978 | { | 2983 | { |
2979 | OSDMap appearanceOsd = (OSDMap)OSDParser.DeserializeLLSDXml(appearanceSerialized); | 2984 | OSDMap appearanceOsd = (OSDMap)OSDParser.DeserializeLLSDXml(appearanceSerialized); |
@@ -2982,14 +2987,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2982 | } | 2987 | } |
2983 | catch | 2988 | catch |
2984 | { | 2989 | { |
2985 | OSSLError(string.Format("osNpcCreate: Error processing notcard '{0}'", notecard)); | 2990 | OSSLError(string.Format("osNpcCreate: Error processing notecard '{0}'", notecard)); |
2986 | return new LSL_Key(UUID.Zero.ToString()); | 2991 | return new LSL_Key(UUID.Zero.ToString()); |
2987 | } | 2992 | } |
2988 | } | 2993 | } |
2989 | else | ||
2990 | { | ||
2991 | OSSLError(string.Format("osNpcCreate: Notecard reference '{0}' not found.", notecard)); | ||
2992 | } | ||
2993 | } | 2994 | } |
2994 | 2995 | ||
2995 | UUID ownerID = UUID.Zero; | 2996 | UUID ownerID = UUID.Zero; |