mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 11:33:28 +08:00
add from string, from lsl string and from span lsl vector3 and rotation variants
This commit is contained in:
@@ -63,6 +63,8 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
/*
|
||||
* For those listed in noCheckRun, we just generate the call (simple computations).
|
||||
* For all others, we generate the call then a call to CheckRun().
|
||||
* note to self: a change here implies change on magic numbers to invalidate older code and
|
||||
* script state
|
||||
*/
|
||||
noCheckRuns = new HashSet<string>() {
|
||||
"llBase64ToString",
|
||||
|
||||
@@ -6761,8 +6761,8 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
{
|
||||
if(val is LSL_Vector)
|
||||
return rVal;
|
||||
if(val is string)
|
||||
nval = new LSL_Vector((string)val);
|
||||
if(val is string sval)
|
||||
nval = new LSL_Vector(sval);
|
||||
}
|
||||
|
||||
if(nval != null)
|
||||
|
||||
@@ -926,7 +926,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
public static LSL_Vector ObjectToVector(object x)
|
||||
{
|
||||
if(x is LSL_String lsx)
|
||||
return new LSL_Vector(lsx.m_string);
|
||||
return new LSL_Vector(lsx);
|
||||
if(x is string sx)
|
||||
return new LSL_Vector(sx);
|
||||
return (LSL_Vector)x;
|
||||
|
||||
Reference in New Issue
Block a user