mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 13:55:35 +08:00
some types may already be native in MOD_Api ConvertFromLSL
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user