diff options
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 04c3184..a81c39c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -2943,6 +2943,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2943 | } | 2943 | } |
2944 | }); | 2944 | }); |
2945 | } | 2945 | } |
2946 | |||
2947 | public LSL_Float osGetHealth(string avatar) | ||
2948 | { | ||
2949 | CheckThreatLevel(ThreatLevel.None, "osGetHealth"); | ||
2950 | m_host.AddScriptLPS(1); | ||
2951 | |||
2952 | LSL_Float health = new LSL_Float(-1); | ||
2953 | ScenePresence presence = World.GetScenePresence(new UUID(avatar)); | ||
2954 | if (presence != null) health = presence.Health; | ||
2955 | return health; | ||
2956 | } | ||
2946 | 2957 | ||
2947 | public void osCauseDamage(string avatar, double damage) | 2958 | public void osCauseDamage(string avatar, double damage) |
2948 | { | 2959 | { |