mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 22:26:09 +08:00
Thank you, Melanie for a patch that helps conversion
from a string to a vector in OSSL.
This commit is contained in:
@@ -1155,6 +1155,11 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
return new LSLString(d);
|
||||
}
|
||||
|
||||
public static implicit operator Vector3(LSLString s)
|
||||
{
|
||||
return new Vector3(s.m_string);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Overriders
|
||||
@@ -1267,6 +1272,16 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
return (double)i.value;
|
||||
}
|
||||
|
||||
public static bool operator true(LSLInteger i)
|
||||
{
|
||||
return i.value != 0;
|
||||
}
|
||||
|
||||
public static bool operator false(LSLInteger i)
|
||||
{
|
||||
return i.value == 0;
|
||||
}
|
||||
|
||||
#region Overriders
|
||||
|
||||
public override string ToString()
|
||||
|
||||
Reference in New Issue
Block a user