diff options
author | Mike Mazur | 2008-07-28 02:36:26 +0000 |
---|---|---|
committer | Mike Mazur | 2008-07-28 02:36:26 +0000 |
commit | d959c65b91a9acc3b29478907a66afc16f01b047 (patch) | |
tree | 34e8caf993bf9ad13ec6f0c45ca1feab59aae163 /OpenSim/Region | |
parent | Adding explicit cast from LSLFloat to LSLInteger. Work on issue 1822. (diff) | |
download | opensim-SC_OLD-d959c65b91a9acc3b29478907a66afc16f01b047.zip opensim-SC_OLD-d959c65b91a9acc3b29478907a66afc16f01b047.tar.gz opensim-SC_OLD-d959c65b91a9acc3b29478907a66afc16f01b047.tar.bz2 opensim-SC_OLD-d959c65b91a9acc3b29478907a66afc16f01b047.tar.xz |
-implement LSLString -> Quaternion explicit cast
-sync Shared/LSL_Types.cs with Common/LSL_Types.cs
-get the test script in issue 1822 to compile
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | 10 |
2 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 d0871bc..74c9935 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | |||
@@ -1190,6 +1190,11 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1190 | return new Vector3(s.m_string); | 1190 | return new Vector3(s.m_string); |
1191 | } | 1191 | } |
1192 | 1192 | ||
1193 | public static implicit operator Quaternion(LSLString s) | ||
1194 | { | ||
1195 | return new Quaternion(s.m_string); | ||
1196 | } | ||
1197 | |||
1193 | public static implicit operator LSLFloat(LSLString s) | 1198 | public static implicit operator LSLFloat(LSLString s) |
1194 | { | 1199 | { |
1195 | return new LSLFloat(Convert.ToDouble(s.m_string)); | 1200 | return new LSLFloat(Convert.ToDouble(s.m_string)); |
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 | |||
1190 | return new Vector3(s.m_string); | 1190 | return new Vector3(s.m_string); |
1191 | } | 1191 | } |
1192 | 1192 | ||
1193 | public static implicit operator Quaternion(LSLString s) | ||
1194 | { | ||
1195 | return new Quaternion(s.m_string); | ||
1196 | } | ||
1197 | |||
1193 | public static implicit operator LSLFloat(LSLString s) | 1198 | public static implicit operator LSLFloat(LSLString s) |
1194 | { | 1199 | { |
1195 | return new LSLFloat(Convert.ToDouble(s.m_string)); | 1200 | return new LSLFloat(Convert.ToDouble(s.m_string)); |
@@ -1291,6 +1296,11 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1291 | return new LSLInteger(d); | 1296 | return new LSLInteger(d); |
1292 | } | 1297 | } |
1293 | 1298 | ||
1299 | static public explicit operator LSLInteger(LSLFloat f) | ||
1300 | { | ||
1301 | return new LSLInteger(f.value); | ||
1302 | } | ||
1303 | |||
1294 | static public bool operator ==(LSLInteger i1, LSLInteger i2) | 1304 | static public bool operator ==(LSLInteger i1, LSLInteger i2) |
1295 | { | 1305 | { |
1296 | bool ret = i1.value == i2.value; | 1306 | bool ret = i1.value == i2.value; |