From 74df815630f21d2f732d386bb9d871dc9fdbc7f9 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Fri, 9 May 2008 03:23:52 +0000 Subject: Thank you, Melanie for a patch that helps conversion from a string to a vector in OSSL. --- OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'OpenSim/Region/ScriptEngine') 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 return new LSLString(d); } + public static implicit operator Vector3(LSLString s) + { + return new Vector3(s.m_string); + } + #endregion #region Overriders @@ -1267,6 +1272,16 @@ namespace OpenSim.Region.ScriptEngine.Common return (double)i.value; } + public static bool operator true(LSLInteger i) + { + return i.value != 0; + } + + public static bool operator false(LSLInteger i) + { + return i.value == 0; + } + #region Overriders public override string ToString() -- cgit v1.1