aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie Thielker2008-09-21 12:18:30 +0000
committerMelanie Thielker2008-09-21 12:18:30 +0000
commit8407d7fbd2a5fcd9509c086661561f6a0604364d (patch)
tree71ee5f45ce07bfdf2338e35bdbe2886e01bfce8f /OpenSim
parentbugfix for shutdown (diff)
downloadopensim-SC-8407d7fbd2a5fcd9509c086661561f6a0604364d.zip
opensim-SC-8407d7fbd2a5fcd9509c086661561f6a0604364d.tar.gz
opensim-SC-8407d7fbd2a5fcd9509c086661561f6a0604364d.tar.bz2
opensim-SC-8407d7fbd2a5fcd9509c086661561f6a0604364d.tar.xz
Mantis #2230
The result of constants arithmetic can be a CLI type. This allows floating point CLI types to be parsed out of lists properly.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
index 27af8a5..91cef5e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
@@ -436,6 +436,18 @@ namespace OpenSim.Region.ScriptEngine.Shared
436 { 436 {
437 return (LSL_Types.LSLInteger)m_data[itemIndex]; 437 return (LSL_Types.LSLInteger)m_data[itemIndex];
438 } 438 }
439 else if (m_data[itemIndex] is Int32)
440 {
441 return new LSL_Types.LSLFloat((int)m_data[itemIndex]);
442 }
443 else if (m_data[itemIndex] is float)
444 {
445 return new LSL_Types.LSLFloat((float)m_data[itemIndex]);
446 }
447 else if (m_data[itemIndex] is Double)
448 {
449 return new LSL_Types.LSLFloat((Double)m_data[itemIndex]);
450 }
439 else 451 else
440 { 452 {
441 return (LSL_Types.LSLFloat)m_data[itemIndex]; 453 return (LSL_Types.LSLFloat)m_data[itemIndex];