mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 22:05:36 +08:00
Merge branch 'master' into careminster
Conflicts: OpenSim/Framework/Monitoring/BaseStatsCollector.cs OpenSim/Region/Application/OpenSim.cs OpenSim/Region/Application/OpenSimBase.cs OpenSim/Region/Framework/Scenes/SceneManager.cs bin/OpenMetaverse.Rendering.Meshmerizer.dll bin/OpenMetaverse.StructuredData.dll bin/OpenMetaverse.dll bin/OpenMetaverseTypes.dll prebuild.xml
This commit is contained in:
@@ -31,6 +31,7 @@ using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Monitoring;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.ScriptEngine.Interfaces;
|
||||
using OpenSim.Region.ScriptEngine.Shared;
|
||||
|
||||
@@ -3290,8 +3290,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
((LSL_Api)m_LSL_Api).llSay(0, string.Format("Unable to attach, item '{0}' is not an object.", itemName));
|
||||
|
||||
throw new Exception(String.Format("The inventory item '{0}' is not an object", itemName));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
ScenePresence sp = World.GetScenePresence(avatarId);
|
||||
@@ -3336,5 +3334,33 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
UUID test;
|
||||
return UUID.TryParse(thing, out test) ? 1 : 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wraps to Math.Min()
|
||||
/// </summary>
|
||||
/// <param name="a"></param>
|
||||
/// <param name="b"></param>
|
||||
/// <returns></returns>
|
||||
public LSL_Float osMin(double a, double b)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.None, "osMin");
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
return Math.Min(a, b);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wraps to Math.max()
|
||||
/// </summary>
|
||||
/// <param name="a"></param>
|
||||
/// <param name="b"></param>
|
||||
/// <returns></returns>
|
||||
public LSL_Float osMax(double a, double b)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.None, "osMax");
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
return Math.Max(a, b);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,5 +283,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
/// <param name="thing"></param>
|
||||
/// <returns>1 if thing is a valid UUID, 0 otherwise</returns>
|
||||
LSL_Integer osIsUUID(string thing);
|
||||
|
||||
/// <summary>
|
||||
/// Wraps to Math.Min()
|
||||
/// </summary>
|
||||
/// <param name="a"></param>
|
||||
/// <param name="b"></param>
|
||||
/// <returns></returns>
|
||||
LSL_Float osMin(double a, double b);
|
||||
|
||||
/// <summary>
|
||||
/// Wraps to Math.max()
|
||||
/// </summary>
|
||||
/// <param name="a"></param>
|
||||
/// <param name="b"></param>
|
||||
/// <returns></returns>
|
||||
LSL_Float osMax(double a, double b);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -935,5 +935,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
{
|
||||
return m_OSSL_Functions.osIsUUID(thing);
|
||||
}
|
||||
|
||||
public LSL_Float osMin(double a, double b)
|
||||
{
|
||||
return m_OSSL_Functions.osMin(a, b);
|
||||
}
|
||||
|
||||
public LSL_Float osMax(double a, double b)
|
||||
{
|
||||
return m_OSSL_Functions.osMax(a, b);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user