aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2016-07-25 02:05:53 +0100
committerUbitUmarov2016-07-25 02:05:53 +0100
commit4b832f0f8e32bf265ee13989500fb0559d1a86f7 (patch)
tree199d9190c3b6b7357ecead907aacb9fa60d88090
parentchange bullet relative velocity sign to match ubOde (diff)
downloadopensim-SC-4b832f0f8e32bf265ee13989500fb0559d1a86f7.zip
opensim-SC-4b832f0f8e32bf265ee13989500fb0559d1a86f7.tar.gz
opensim-SC-4b832f0f8e32bf265ee13989500fb0559d1a86f7.tar.bz2
opensim-SC-4b832f0f8e32bf265ee13989500fb0559d1a86f7.tar.xz
add osGetHealRate(avatarkey) and osSetHealRate(avatarkey, healrate); healrate from 0 (disables auto heal) to 100 (maybe too fast) % per second. (untested)
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs24
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs10
-rw-r--r--bin/config-include/osslEnable.ini2
4 files changed, 38 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);
diff --git a/bin/config-include/osslEnable.ini b/bin/config-include/osslEnable.ini
index a31dd17..8f9702d 100644
--- a/bin/config-include/osslEnable.ini
+++ b/bin/config-include/osslEnable.ini
@@ -158,6 +158,8 @@
158 Allow_osCauseDamage = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER 158 Allow_osCauseDamage = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
159 Allow_osCauseHealing = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER 159 Allow_osCauseHealing = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
160 Allow_osSetHealth = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER 160 Allow_osSetHealth = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
161 Allow_osSetHealRate = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
162 Allow_osGetHealRate = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
161 Allow_osForceAttachToAvatar = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER 163 Allow_osForceAttachToAvatar = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
162 Allow_osForceAttachToAvatarFromInventory = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER 164 Allow_osForceAttachToAvatarFromInventory = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
163 Allow_osForceCreateLink = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER 165 Allow_osForceCreateLink = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER