aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common
diff options
context:
space:
mode:
authorCharles Krinke2008-05-09 03:23:52 +0000
committerCharles Krinke2008-05-09 03:23:52 +0000
commit74df815630f21d2f732d386bb9d871dc9fdbc7f9 (patch)
treeb50ce221ace37a0536b64c58f9568c5d5bc8bb6a /OpenSim/Region/ScriptEngine/Common
parentThank you, Melanie for a patch that: (diff)
downloadopensim-SC_OLD-74df815630f21d2f732d386bb9d871dc9fdbc7f9.zip
opensim-SC_OLD-74df815630f21d2f732d386bb9d871dc9fdbc7f9.tar.gz
opensim-SC_OLD-74df815630f21d2f732d386bb9d871dc9fdbc7f9.tar.bz2
opensim-SC_OLD-74df815630f21d2f732d386bb9d871dc9fdbc7f9.tar.xz
Thank you, Melanie for a patch that helps conversion
from a string to a vector in OSSL.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_Types.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
index 923b81e..09ab5d4 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
@@ -1155,6 +1155,11 @@ namespace OpenSim.Region.ScriptEngine.Common
1155 return new LSLString(d); 1155 return new LSLString(d);
1156 } 1156 }
1157 1157
1158 public static implicit operator Vector3(LSLString s)
1159 {
1160 return new Vector3(s.m_string);
1161 }
1162
1158 #endregion 1163 #endregion
1159 1164
1160 #region Overriders 1165 #region Overriders
@@ -1267,6 +1272,16 @@ namespace OpenSim.Region.ScriptEngine.Common
1267 return (double)i.value; 1272 return (double)i.value;
1268 } 1273 }
1269 1274
1275 public static bool operator true(LSLInteger i)
1276 {
1277 return i.value != 0;
1278 }
1279
1280 public static bool operator false(LSLInteger i)
1281 {
1282 return i.value == 0;
1283 }
1284
1270 #region Overriders 1285 #region Overriders
1271 1286
1272 public override string ToString() 1287 public override string ToString()