diff options
author | ubit | 2012-08-02 18:21:08 +0200 |
---|---|---|
committer | ubit | 2012-08-02 18:21:08 +0200 |
commit | 254d3e1ad31f99770074abb49fec03c90d99b246 (patch) | |
tree | fe2d2337f0fffec0f44a9f35442d73c8fe78fda3 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |
parent | i local libs commit (diff) | |
parent | Merge branch 'master' into careminster (diff) | |
download | opensim-SC-254d3e1ad31f99770074abb49fec03c90d99b246.zip opensim-SC-254d3e1ad31f99770074abb49fec03c90d99b246.tar.gz opensim-SC-254d3e1ad31f99770074abb49fec03c90d99b246.tar.bz2 opensim-SC-254d3e1ad31f99770074abb49fec03c90d99b246.tar.xz |
merge crap gerge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork
Conflicts:
bin/Regions/Regions.ini.example
bin/lib32/BulletSim.dll
bin/lib32/libBulletSim.so
bin/lib64/BulletSim.dll
bin/lib64/libBulletSim.so
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 44 |
1 files changed, 42 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 29d0342..1181c10 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -3290,8 +3290,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3290 | ((LSL_Api)m_LSL_Api).llSay(0, string.Format("Unable to attach, item '{0}' is not an object.", itemName)); | 3290 | ((LSL_Api)m_LSL_Api).llSay(0, string.Format("Unable to attach, item '{0}' is not an object.", itemName)); |
3291 | 3291 | ||
3292 | throw new Exception(String.Format("The inventory item '{0}' is not an object", itemName)); | 3292 | throw new Exception(String.Format("The inventory item '{0}' is not an object", itemName)); |
3293 | |||
3294 | return; | ||
3295 | } | 3293 | } |
3296 | 3294 | ||
3297 | ScenePresence sp = World.GetScenePresence(avatarId); | 3295 | ScenePresence sp = World.GetScenePresence(avatarId); |
@@ -3322,5 +3320,47 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3322 | InitLSL(); | 3320 | InitLSL(); |
3323 | ((LSL_Api)m_LSL_Api).DetachFromAvatar(); | 3321 | ((LSL_Api)m_LSL_Api).DetachFromAvatar(); |
3324 | } | 3322 | } |
3323 | |||
3324 | /// <summary> | ||
3325 | /// Checks if thing is a UUID. | ||
3326 | /// </summary> | ||
3327 | /// <param name="thing"></param> | ||
3328 | /// <returns>1 if thing is a valid UUID, 0 otherwise</returns> | ||
3329 | public LSL_Integer osIsUUID(string thing) | ||
3330 | { | ||
3331 | CheckThreatLevel(ThreatLevel.None, "osIsUUID"); | ||
3332 | m_host.AddScriptLPS(1); | ||
3333 | |||
3334 | UUID test; | ||
3335 | return UUID.TryParse(thing, out test) ? 1 : 0; | ||
3336 | } | ||
3337 | |||
3338 | /// <summary> | ||
3339 | /// Wraps to Math.Min() | ||
3340 | /// </summary> | ||
3341 | /// <param name="a"></param> | ||
3342 | /// <param name="b"></param> | ||
3343 | /// <returns></returns> | ||
3344 | public LSL_Float osMin(double a, double b) | ||
3345 | { | ||
3346 | CheckThreatLevel(ThreatLevel.None, "osMin"); | ||
3347 | m_host.AddScriptLPS(1); | ||
3348 | |||
3349 | return Math.Min(a, b); | ||
3350 | } | ||
3351 | |||
3352 | /// <summary> | ||
3353 | /// Wraps to Math.max() | ||
3354 | /// </summary> | ||
3355 | /// <param name="a"></param> | ||
3356 | /// <param name="b"></param> | ||
3357 | /// <returns></returns> | ||
3358 | public LSL_Float osMax(double a, double b) | ||
3359 | { | ||
3360 | CheckThreatLevel(ThreatLevel.None, "osMax"); | ||
3361 | m_host.AddScriptLPS(1); | ||
3362 | |||
3363 | return Math.Max(a, b); | ||
3364 | } | ||
3325 | } | 3365 | } |
3326 | } | 3366 | } |