aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Runtime
diff options
context:
space:
mode:
authorTBG Renfold2012-08-09 18:03:26 +0100
committerJustin Clark-Casey (justincc)2012-08-24 00:13:14 +0100
commit4f3fabae5bec8a71f9953ef9f4c247e086e4757f (patch)
treee274526ce8e1653175f8da04000d8b07f10507b3 /OpenSim/Region/ScriptEngine/Shared/Api/Runtime
parentIf a script state save fails for some reason on shutdown/region removal, get ... (diff)
downloadopensim-SC_OLD-4f3fabae5bec8a71f9953ef9f4c247e086e4757f.zip
opensim-SC_OLD-4f3fabae5bec8a71f9953ef9f4c247e086e4757f.tar.gz
opensim-SC_OLD-4f3fabae5bec8a71f9953ef9f4c247e086e4757f.tar.bz2
opensim-SC_OLD-4f3fabae5bec8a71f9953ef9f4c247e086e4757f.tar.xz
Adds osGetHealth.
Returns the amount of health (in an integer) that an avatar has left in the scene. If an avatar is not found or safe is enabled on a region, -1 is returned. Example usage: default { touch_end(integer _t) { key agentID = llDetectedKey(0); osCauseDamage(agentID, 50); llSay(0, llKey2Name(agentID) + " has " + (string)osGetHealth(agentID) + "% health left."); } }
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Runtime')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index 94405d2..e9131e4 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -865,7 +865,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
865 { 865 {
866 m_OSSL_Functions.osSetSpeed(UUID, SpeedModifier); 866 m_OSSL_Functions.osSetSpeed(UUID, SpeedModifier);
867 } 867 }
868 868
869 public LSL_Float osGetHealth(string avatar)
870 {
871 return m_OSSL_Functions.osGetHealth(avatar);
872 }
873
869 public void osCauseDamage(string avatar, double damage) 874 public void osCauseDamage(string avatar, double damage)
870 { 875 {
871 m_OSSL_Functions.osCauseDamage(avatar, damage); 876 m_OSSL_Functions.osCauseDamage(avatar, damage);