mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
-implement LSLString -> Quaternion explicit cast
-sync Shared/LSL_Types.cs with Common/LSL_Types.cs -get the test script in issue 1822 to compile
This commit is contained in:
@@ -1190,6 +1190,11 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
return new Vector3(s.m_string);
|
||||
}
|
||||
|
||||
public static implicit operator Quaternion(LSLString s)
|
||||
{
|
||||
return new Quaternion(s.m_string);
|
||||
}
|
||||
|
||||
public static implicit operator LSLFloat(LSLString s)
|
||||
{
|
||||
return new LSLFloat(Convert.ToDouble(s.m_string));
|
||||
@@ -1291,6 +1296,11 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
return new LSLInteger(d);
|
||||
}
|
||||
|
||||
static public explicit operator LSLInteger(LSLFloat f)
|
||||
{
|
||||
return new LSLInteger(f.value);
|
||||
}
|
||||
|
||||
static public bool operator ==(LSLInteger i1, LSLInteger i2)
|
||||
{
|
||||
bool ret = i1.value == i2.value;
|
||||
|
||||
Reference in New Issue
Block a user