diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index d5f2e78..86ea437 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -16794,7 +16794,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
16794 | case LitJson.JsonType.Boolean: | 16794 | case LitJson.JsonType.Boolean: |
16795 | return ((bool)elem ? (LSL_String)ScriptBaseClass.JSON_TRUE : (LSL_String)ScriptBaseClass.JSON_FALSE); | 16795 | return ((bool)elem ? (LSL_String)ScriptBaseClass.JSON_TRUE : (LSL_String)ScriptBaseClass.JSON_FALSE); |
16796 | case LitJson.JsonType.Double: | 16796 | case LitJson.JsonType.Double: |
16797 | return (new LSL_Float((float)elem)); | 16797 | return (new LSL_Float((double)elem)); |
16798 | case LitJson.JsonType.None: | 16798 | case LitJson.JsonType.None: |
16799 | return ((LSL_String)ScriptBaseClass.JSON_NULL); | 16799 | return ((LSL_String)ScriptBaseClass.JSON_NULL); |
16800 | case LitJson.JsonType.String: | 16800 | case LitJson.JsonType.String: |
@@ -16804,7 +16804,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
16804 | string s = LitJson.JsonMapper.ToJson(elem); | 16804 | string s = LitJson.JsonMapper.ToJson(elem); |
16805 | return (LSL_String)s; | 16805 | return (LSL_String)s; |
16806 | default: | 16806 | default: |
16807 | throw new Exception(ScriptBaseClass.JSON_INVALID); | 16807 | throw new Exception(ScriptBaseClass.JSON_INVALID); |
16808 | } | 16808 | } |
16809 | } | 16809 | } |
16810 | 16810 | ||
@@ -16879,9 +16879,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
16879 | return i.ToString(); | 16879 | return i.ToString(); |
16880 | } | 16880 | } |
16881 | if (o is LSL_Rotation) | 16881 | if (o is LSL_Rotation) |
16882 | return ((LSL_Rotation)o).ToString(); | 16882 | { |
16883 | StringBuilder sb = new StringBuilder(128); | ||
16884 | sb.Append("\""); | ||
16885 | LSL_Rotation r = (LSL_Rotation)o; | ||
16886 | sb.Append(r.ToString()); | ||
16887 | sb.Append("\""); | ||
16888 | return sb.ToString(); | ||
16889 | } | ||
16883 | if (o is LSL_Vector) | 16890 | if (o is LSL_Vector) |
16884 | return ((LSL_Vector)o).ToString(); | 16891 | { |
16892 | StringBuilder sb = new StringBuilder(128); | ||
16893 | sb.Append("\""); | ||
16894 | LSL_Vector v = (LSL_Vector)o; | ||
16895 | sb.Append(v.ToString()); | ||
16896 | sb.Append("\""); | ||
16897 | return sb.ToString(); | ||
16898 | } | ||
16885 | if (o is LSL_String || o is string) | 16899 | if (o is LSL_String || o is string) |
16886 | { | 16900 | { |
16887 | string str; | 16901 | string str; |