diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 3ae1f3a..3e5e12c 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -3421,6 +3421,12 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3421 | } | 3421 | } |
3422 | try | 3422 | try |
3423 | { | 3423 | { |
3424 | if (src.Data[index] is LSL_Types.LSLInteger) | ||
3425 | return Convert.ToInt32(((LSL_Types.LSLInteger) src.Data[index]).value); | ||
3426 | else if (src.Data[index] is LSL_Types.LSLFloat) | ||
3427 | return Convert.ToInt32(((LSL_Types.LSLFloat) src.Data[index]).value); | ||
3428 | else if (src.Data[index] is LSL_Types.LSLString) | ||
3429 | return Convert.ToInt32(((LSL_Types.LSLString) src.Data[index]).m_string); | ||
3424 | return Convert.ToInt32(src.Data[index]); | 3430 | return Convert.ToInt32(src.Data[index]); |
3425 | } | 3431 | } |
3426 | catch (FormatException) | 3432 | catch (FormatException) |
@@ -3440,6 +3446,12 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3440 | { | 3446 | { |
3441 | return 0.0; | 3447 | return 0.0; |
3442 | } | 3448 | } |
3449 | if (src.Data[index] is LSL_Types.LSLInteger) | ||
3450 | return Convert.ToDouble(((LSL_Types.LSLInteger) src.Data[index]).value); | ||
3451 | else if (src.Data[index] is LSL_Types.LSLFloat) | ||
3452 | return Convert.ToDouble(((LSL_Types.LSLFloat) src.Data[index]).value); | ||
3453 | else if (src.Data[index] is LSL_Types.LSLString) | ||
3454 | return Convert.ToDouble(((LSL_Types.LSLString) src.Data[index]).m_string); | ||
3443 | return Convert.ToDouble(src.Data[index]); | 3455 | return Convert.ToDouble(src.Data[index]); |
3444 | } | 3456 | } |
3445 | 3457 | ||
@@ -3456,6 +3468,12 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3456 | } | 3468 | } |
3457 | try | 3469 | try |
3458 | { | 3470 | { |
3471 | if (src.Data[index] is LSL_Types.LSLInteger) | ||
3472 | return Convert.ToDouble(((LSL_Types.LSLInteger) src.Data[index]).value); | ||
3473 | else if (src.Data[index] is LSL_Types.LSLFloat) | ||
3474 | return Convert.ToDouble(((LSL_Types.LSLFloat) src.Data[index]).value); | ||
3475 | else if (src.Data[index] is LSL_Types.LSLString) | ||
3476 | return Convert.ToDouble(((LSL_Types.LSLString) src.Data[index]).m_string); | ||
3459 | return Convert.ToDouble(src.Data[index]); | 3477 | return Convert.ToDouble(src.Data[index]); |
3460 | } | 3478 | } |
3461 | catch (FormatException) | 3479 | catch (FormatException) |