mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 13:55:35 +08:00
Merge branch 'master' into careminster-presence-refactor
This commit is contained in:
@@ -4887,6 +4887,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return result;
|
||||
}
|
||||
|
||||
public LSL_Integer llGetLinkNumberOfSides(int link)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
SceneObjectPart linkedPart;
|
||||
|
||||
if (link == ScriptBaseClass.LINK_ROOT)
|
||||
linkedPart = m_host.ParentGroup.RootPart;
|
||||
else if (link == ScriptBaseClass.LINK_THIS)
|
||||
linkedPart = m_host;
|
||||
else
|
||||
linkedPart = m_host.ParentGroup.GetLinkNumPart(link);
|
||||
|
||||
return GetNumberOfSides(linkedPart);
|
||||
}
|
||||
|
||||
public LSL_Integer llGetNumberOfSides()
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
@@ -1530,6 +1530,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
public struct LSLInteger
|
||||
{
|
||||
public int value;
|
||||
private static readonly Regex castRegex = new Regex(@"(^[ ]*0[xX][0-9A-Fa-f][0-9A-Fa-f]*)|(^[ ]*(-?|\+?)[0-9][0-9]*)");
|
||||
|
||||
#region Constructors
|
||||
public LSLInteger(int i)
|
||||
@@ -1549,9 +1550,10 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
|
||||
public LSLInteger(string s)
|
||||
{
|
||||
Regex r = new Regex("(^[ ]*0[xX][0-9A-Fa-f][0-9A-Fa-f]*)|(^[ ]*-?[0-9][0-9]*)");
|
||||
Match m = r.Match(s);
|
||||
Match m = castRegex.Match(s);
|
||||
string v = m.Groups[0].Value;
|
||||
// Leading plus sign is allowed, but ignored
|
||||
v = v.Replace("+", "");
|
||||
|
||||
if (v == String.Empty)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user