From d959c65b91a9acc3b29478907a66afc16f01b047 Mon Sep 17 00:00:00 2001 From: Mike Mazur Date: Mon, 28 Jul 2008 02:36:26 +0000 Subject: -implement LSLString -> Quaternion explicit cast -sync Shared/LSL_Types.cs with Common/LSL_Types.cs -get the test script in issue 1822 to compile --- OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Shared') diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index 89722da..57394d9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs @@ -1190,6 +1190,11 @@ namespace OpenSim.Region.ScriptEngine.Shared return new Vector3(s.m_string); } + public static implicit operator Quaternion(LSLString s) + { + return new Quaternion(s.m_string); + } + public static implicit operator LSLFloat(LSLString s) { return new LSLFloat(Convert.ToDouble(s.m_string)); @@ -1291,6 +1296,11 @@ namespace OpenSim.Region.ScriptEngine.Shared return new LSLInteger(d); } + static public explicit operator LSLInteger(LSLFloat f) + { + return new LSLInteger(f.value); + } + static public bool operator ==(LSLInteger i1, LSLInteger i2) { bool ret = i1.value == i2.value; -- cgit v1.1