diff options
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; |