The result of constants arithmetic can be a CLI type. This allows floating
point CLI types to be parsed out of lists properly.
0.6.0-stable
Melanie Thielker 2008-09-21 12:18:30 +00:00
parent 4ce0e6d822
commit 8407d7fbd2
1 changed files with 12 additions and 0 deletions

View File

@ -436,6 +436,18 @@ namespace OpenSim.Region.ScriptEngine.Shared
{ {
return (LSL_Types.LSLInteger)m_data[itemIndex]; return (LSL_Types.LSLInteger)m_data[itemIndex];
} }
else if (m_data[itemIndex] is Int32)
{
return new LSL_Types.LSLFloat((int)m_data[itemIndex]);
}
else if (m_data[itemIndex] is float)
{
return new LSL_Types.LSLFloat((float)m_data[itemIndex]);
}
else if (m_data[itemIndex] is Double)
{
return new LSL_Types.LSLFloat((Double)m_data[itemIndex]);
}
else else
{ {
return (LSL_Types.LSLFloat)m_data[itemIndex]; return (LSL_Types.LSLFloat)m_data[itemIndex];