diff options
author | SignpostMarv | 2012-08-28 03:21:04 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-08-29 02:10:04 +0100 |
commit | 3bf7bd6359ffbbc2a00b6870b72cc78287a70bc7 (patch) | |
tree | faca1aeb98c94bfe7baeed481e3bffcd62858167 /OpenSim | |
parent | Fix regression introduced in a0d178b2 (Sat Aug 25 02:00:17 2012) where folder... (diff) | |
download | opensim-SC-3bf7bd6359ffbbc2a00b6870b72cc78287a70bc7.zip opensim-SC-3bf7bd6359ffbbc2a00b6870b72cc78287a70bc7.tar.gz opensim-SC-3bf7bd6359ffbbc2a00b6870b72cc78287a70bc7.tar.bz2 opensim-SC-3bf7bd6359ffbbc2a00b6870b72cc78287a70bc7.tar.xz |
track originating IScriptApi method for SL-like error messages. Will add rule number tracking in next commit.
Diffstat (limited to '')
3 files changed, 17 insertions, 13 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index b001c51..709cac2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -7208,7 +7208,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7208 | { | 7208 | { |
7209 | m_host.AddScriptLPS(1); | 7209 | m_host.AddScriptLPS(1); |
7210 | 7210 | ||
7211 | setLinkPrimParams(ScriptBaseClass.LINK_THIS, rules); | 7211 | setLinkPrimParams(ScriptBaseClass.LINK_THIS, rules, "llSetPrimitiveParams"); |
7212 | 7212 | ||
7213 | ScriptSleep(200); | 7213 | ScriptSleep(200); |
7214 | } | 7214 | } |
@@ -7217,7 +7217,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7217 | { | 7217 | { |
7218 | m_host.AddScriptLPS(1); | 7218 | m_host.AddScriptLPS(1); |
7219 | 7219 | ||
7220 | setLinkPrimParams(linknumber, rules); | 7220 | setLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParams"); |
7221 | 7221 | ||
7222 | ScriptSleep(200); | 7222 | ScriptSleep(200); |
7223 | } | 7223 | } |
@@ -7226,17 +7226,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7226 | { | 7226 | { |
7227 | m_host.AddScriptLPS(1); | 7227 | m_host.AddScriptLPS(1); |
7228 | 7228 | ||
7229 | setLinkPrimParams(linknumber, rules); | 7229 | setLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParamsFast"); |
7230 | } | 7230 | } |
7231 | 7231 | ||
7232 | protected void setLinkPrimParams(int linknumber, LSL_List rules) | 7232 | protected void setLinkPrimParams(int linknumber, LSL_List rules, string originFunc) |
7233 | { | 7233 | { |
7234 | List<SceneObjectPart> parts = GetLinkParts(linknumber); | 7234 | List<SceneObjectPart> parts = GetLinkParts(linknumber); |
7235 | 7235 | ||
7236 | LSL_List remaining = null; | 7236 | LSL_List remaining = null; |
7237 | 7237 | ||
7238 | foreach (SceneObjectPart part in parts) | 7238 | foreach (SceneObjectPart part in parts) |
7239 | remaining = SetPrimParams(part, rules); | 7239 | remaining = SetPrimParams(part, rules, originFunc); |
7240 | 7240 | ||
7241 | while (remaining != null && remaining.Length > 2) | 7241 | while (remaining != null && remaining.Length > 2) |
7242 | { | 7242 | { |
@@ -7245,13 +7245,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7245 | parts = GetLinkParts(linknumber); | 7245 | parts = GetLinkParts(linknumber); |
7246 | 7246 | ||
7247 | foreach (SceneObjectPart part in parts) | 7247 | foreach (SceneObjectPart part in parts) |
7248 | remaining = SetPrimParams(part, rules); | 7248 | remaining = SetPrimParams(part, rules, originFunc); |
7249 | } | 7249 | } |
7250 | } | 7250 | } |
7251 | 7251 | ||
7252 | protected LSL_List SetPrimParams(SceneObjectPart part, LSL_List rules) | 7252 | protected LSL_List SetPrimParams(SceneObjectPart part, LSL_List rules, string originFunc) |
7253 | { | 7253 | { |
7254 | int idx = 0; | 7254 | int idx = 0; |
7255 | int idxStart = 0; | ||
7255 | 7256 | ||
7256 | bool positionChanged = false; | 7257 | bool positionChanged = false; |
7257 | LSL_Vector currentPosition = GetPartLocalPos(part); | 7258 | LSL_Vector currentPosition = GetPartLocalPos(part); |
@@ -7263,6 +7264,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7263 | int code = rules.GetLSLIntegerItem(idx++); | 7264 | int code = rules.GetLSLIntegerItem(idx++); |
7264 | 7265 | ||
7265 | int remain = rules.Length - idx; | 7266 | int remain = rules.Length - idx; |
7267 | idxStart = idx; | ||
7266 | 7268 | ||
7267 | int face; | 7269 | int face; |
7268 | LSL_Vector v; | 7270 | LSL_Vector v; |
@@ -7639,7 +7641,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7639 | } | 7641 | } |
7640 | catch (InvalidCastException e) | 7642 | catch (InvalidCastException e) |
7641 | { | 7643 | { |
7642 | ShoutError(e.Message); | 7644 | ShoutError(string.Format( |
7645 | "{0} error running rule #{1}: arg #{2} ", | ||
7646 | originFunc, "unknown", idx - idxStart) + e.Message); | ||
7643 | } | 7647 | } |
7644 | finally | 7648 | finally |
7645 | { | 7649 | { |
@@ -10761,7 +10765,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10761 | return tid.ToString(); | 10765 | return tid.ToString(); |
10762 | } | 10766 | } |
10763 | 10767 | ||
10764 | public void SetPrimitiveParamsEx(LSL_Key prim, LSL_List rules) | 10768 | public void SetPrimitiveParamsEx(LSL_Key prim, LSL_List rules, string originFunc) |
10765 | { | 10769 | { |
10766 | SceneObjectPart obj = World.GetSceneObjectPart(new UUID(prim)); | 10770 | SceneObjectPart obj = World.GetSceneObjectPart(new UUID(prim)); |
10767 | if (obj == null) | 10771 | if (obj == null) |
@@ -10770,14 +10774,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10770 | if (obj.OwnerID != m_host.OwnerID) | 10774 | if (obj.OwnerID != m_host.OwnerID) |
10771 | return; | 10775 | return; |
10772 | 10776 | ||
10773 | LSL_List remaining = SetPrimParams(obj, rules); | 10777 | LSL_List remaining = SetPrimParams(obj, rules, originFunc); |
10774 | 10778 | ||
10775 | while ((object)remaining != null && remaining.Length > 2) | 10779 | while ((object)remaining != null && remaining.Length > 2) |
10776 | { | 10780 | { |
10777 | LSL_Integer newLink = remaining.GetLSLIntegerItem(0); | 10781 | LSL_Integer newLink = remaining.GetLSLIntegerItem(0); |
10778 | LSL_List newrules = remaining.GetSublist(1, -1); | 10782 | LSL_List newrules = remaining.GetSublist(1, -1); |
10779 | foreach(SceneObjectPart part in GetLinkParts(obj, newLink)){ | 10783 | foreach(SceneObjectPart part in GetLinkParts(obj, newLink)){ |
10780 | remaining = SetPrimParams(part, newrules); | 10784 | remaining = SetPrimParams(part, newrules, originFunc); |
10781 | } | 10785 | } |
10782 | } | 10786 | } |
10783 | } | 10787 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 1afa4fb..09fcf50 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -2988,7 +2988,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2988 | m_host.AddScriptLPS(1); | 2988 | m_host.AddScriptLPS(1); |
2989 | InitLSL(); | 2989 | InitLSL(); |
2990 | 2990 | ||
2991 | m_LSL_Api.SetPrimitiveParamsEx(prim, rules); | 2991 | m_LSL_Api.SetPrimitiveParamsEx(prim, rules, "osSetPrimitiveParams"); |
2992 | } | 2992 | } |
2993 | 2993 | ||
2994 | /// <summary> | 2994 | /// <summary> |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs index cd58614..e97ff9d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs | |||
@@ -424,7 +424,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
424 | LSL_String llXorBase64StringsCorrect(string str1, string str2); | 424 | LSL_String llXorBase64StringsCorrect(string str1, string str2); |
425 | void print(string str); | 425 | void print(string str); |
426 | 426 | ||
427 | void SetPrimitiveParamsEx(LSL_Key prim, LSL_List rules); | 427 | void SetPrimitiveParamsEx(LSL_Key prim, LSL_List rules, string originFunc); |
428 | LSL_List GetPrimitiveParamsEx(LSL_Key prim, LSL_List rules); | 428 | LSL_List GetPrimitiveParamsEx(LSL_Key prim, LSL_List rules); |
429 | } | 429 | } |
430 | } | 430 | } |