The result of constants arithmetic can be a CLI type. This allows floating
point CLI types to be parsed out of lists properly.
This commit is contained in:
Melanie Thielker
2008-09-21 12:18:30 +00:00
parent 4ce0e6d822
commit 8407d7fbd2

View File

@@ -436,6 +436,18 @@ namespace OpenSim.Region.ScriptEngine.Shared
{
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
{
return (LSL_Types.LSLFloat)m_data[itemIndex];