some types may already be native in MOD_Api ConvertFromLSL

This commit is contained in:
UbitUmarov
2016-11-05 20:14:11 +00:00
parent 22d20dbf17
commit 8cc8d15f95
3 changed files with 7 additions and 3 deletions

View File

@@ -365,8 +365,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
/// </summary>
protected object ConvertFromLSL(object lslparm, Type type, string fname)
{
if(lslparm.GetType() == type)
return lslparm;
// ---------- String ----------
if (lslparm is LSL_String)
else if (lslparm is LSL_String)
{
if (type == typeof(string))
return (string)(LSL_String)lslparm;

View File

@@ -270,7 +270,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
TestHelpers.InMethod();
LSL_Types.Quaternion testValue = new LSL_Types.Quaternion(12.64, 59.43723, 765.3421, 4.00987);
// make that nonesense a quartenion
// make that nonsense a quaternion
testValue.Normalize();
LSL_Types.list testList = new LSL_Types.list(testValue);