diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
3 files changed, 36 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 072d10d..7a2b24f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -3488,6 +3488,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3488 | } | 3488 | } |
3489 | } | 3489 | } |
3490 | 3490 | ||
3491 | public void osSetHealRate(string avatar, double healrate) | ||
3492 | { | ||
3493 | CheckThreatLevel(ThreatLevel.High, "osSetHealRate"); | ||
3494 | m_host.AddScriptLPS(1); | ||
3495 | |||
3496 | UUID avatarId = new UUID(avatar); | ||
3497 | ScenePresence presence = World.GetScenePresence(avatarId); | ||
3498 | |||
3499 | if (presence != null && World.ScriptDanger(m_host.LocalId, m_host.GetWorldPosition())) | ||
3500 | presence.HealRate = (float)healrate; | ||
3501 | } | ||
3502 | |||
3503 | public LSL_Float osGetHealRate(string avatar) | ||
3504 | { | ||
3505 | CheckThreatLevel(ThreatLevel.None, "osGetHealRate"); | ||
3506 | m_host.AddScriptLPS(1); | ||
3507 | |||
3508 | LSL_Float rate = new LSL_Float(0); | ||
3509 | ScenePresence presence = World.GetScenePresence(new UUID(avatar)); | ||
3510 | if (presence != null) | ||
3511 | rate = presence.HealRate; | ||
3512 | return rate; | ||
3513 | } | ||
3514 | |||
3491 | public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules) | 3515 | public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules) |
3492 | { | 3516 | { |
3493 | CheckThreatLevel(ThreatLevel.High, "osGetPrimitiveParams"); | 3517 | CheckThreatLevel(ThreatLevel.High, "osGetPrimitiveParams"); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index a018bac..c99679e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -369,6 +369,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
369 | LSL_Float osGetHealth(string avatar); | 369 | LSL_Float osGetHealth(string avatar); |
370 | void osCauseHealing(string avatar, double healing); | 370 | void osCauseHealing(string avatar, double healing); |
371 | void osSetHealth(string avatar, double health); | 371 | void osSetHealth(string avatar, double health); |
372 | void osSetHealRate(string avatar, double health); | ||
373 | LSL_Float osGetHealRate(string avatar); | ||
372 | void osCauseDamage(string avatar, double damage); | 374 | void osCauseDamage(string avatar, double damage); |
373 | void osForceOtherSit(string avatar); | 375 | void osForceOtherSit(string avatar); |
374 | void osForceOtherSit(string avatar, string target); | 376 | void osForceOtherSit(string avatar, string target); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index c55ff8e..35eee59 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -950,6 +950,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
950 | m_OSSL_Functions.osSetHealth(avatar, health); | 950 | m_OSSL_Functions.osSetHealth(avatar, health); |
951 | } | 951 | } |
952 | 952 | ||
953 | public void osSetHealRate(string avatar, double health) | ||
954 | { | ||
955 | m_OSSL_Functions.osSetHealRate(avatar, health); | ||
956 | } | ||
957 | |||
958 | public LSL_Float osGetHealRate(string avatar) | ||
959 | { | ||
960 | return m_OSSL_Functions.osGetHealRate(avatar); | ||
961 | } | ||
962 | |||
953 | public void osForceOtherSit(string avatar) | 963 | public void osForceOtherSit(string avatar) |
954 | { | 964 | { |
955 | m_OSSL_Functions.osForceOtherSit(avatar); | 965 | m_OSSL_Functions.osForceOtherSit(avatar); |