diff options
author | UbitUmarov | 2017-01-21 06:37:29 +0000 |
---|---|---|
committer | UbitUmarov | 2017-01-21 06:37:29 +0000 |
commit | 0a5d6671cec0eaea00127e29d4237cc4614d111d (patch) | |
tree | 478fd1c3a172f90dbbae1bb624698bef6d140c2b /OpenSim/Region/ScriptEngine | |
parent | fix CanObjectEntry and CanTerraformLand group permissions (diff) | |
download | opensim-SC_OLD-0a5d6671cec0eaea00127e29d4237cc4614d111d.zip opensim-SC_OLD-0a5d6671cec0eaea00127e29d4237cc4614d111d.tar.gz opensim-SC_OLD-0a5d6671cec0eaea00127e29d4237cc4614d111d.tar.bz2 opensim-SC_OLD-0a5d6671cec0eaea00127e29d4237cc4614d111d.tar.xz |
fix llScriptDanger(); don't call old ScriptDamage on ossl health functions
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 3cdf49c..226ad6c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -7963,7 +7963,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7963 | public LSL_Integer llScriptDanger(LSL_Vector pos) | 7963 | public LSL_Integer llScriptDanger(LSL_Vector pos) |
7964 | { | 7964 | { |
7965 | m_host.AddScriptLPS(1); | 7965 | m_host.AddScriptLPS(1); |
7966 | bool result = World.ScriptDanger(m_host.LocalId, pos); | 7966 | bool result = World.LSLScriptDanger(m_host, pos); |
7967 | if (result) | 7967 | if (result) |
7968 | { | 7968 | { |
7969 | return 1; | 7969 | return 1; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index a17eb03..4c3f7ee 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -3538,7 +3538,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3538 | 3538 | ||
3539 | LSL_Float health = new LSL_Float(-1); | 3539 | LSL_Float health = new LSL_Float(-1); |
3540 | ScenePresence presence = World.GetScenePresence(new UUID(avatar)); | 3540 | ScenePresence presence = World.GetScenePresence(new UUID(avatar)); |
3541 | if (presence != null) health = presence.Health; | 3541 | if (presence != null) |
3542 | health = presence.Health; | ||
3542 | return health; | 3543 | return health; |
3543 | } | 3544 | } |
3544 | 3545 | ||
@@ -3578,7 +3579,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3578 | UUID avatarId = new UUID(avatar); | 3579 | UUID avatarId = new UUID(avatar); |
3579 | ScenePresence presence = World.GetScenePresence(avatarId); | 3580 | ScenePresence presence = World.GetScenePresence(avatarId); |
3580 | 3581 | ||
3581 | if (presence != null && World.ScriptDanger(m_host.LocalId, m_host.GetWorldPosition())) | 3582 | if (presence != null) |
3582 | { | 3583 | { |
3583 | float health = presence.Health; | 3584 | float health = presence.Health; |
3584 | health += (float)healing; | 3585 | health += (float)healing; |
@@ -3598,7 +3599,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3598 | UUID avatarId = new UUID(avatar); | 3599 | UUID avatarId = new UUID(avatar); |
3599 | ScenePresence presence = World.GetScenePresence(avatarId); | 3600 | ScenePresence presence = World.GetScenePresence(avatarId); |
3600 | 3601 | ||
3601 | if (presence != null && World.ScriptDanger(m_host.LocalId, m_host.GetWorldPosition())) | 3602 | if (presence != null) |
3602 | { | 3603 | { |
3603 | if (health > 100.0) | 3604 | if (health > 100.0) |
3604 | health = 100.0; | 3605 | health = 100.0; |
@@ -3617,7 +3618,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3617 | UUID avatarId = new UUID(avatar); | 3618 | UUID avatarId = new UUID(avatar); |
3618 | ScenePresence presence = World.GetScenePresence(avatarId); | 3619 | ScenePresence presence = World.GetScenePresence(avatarId); |
3619 | 3620 | ||
3620 | if (presence != null && World.ScriptDanger(m_host.LocalId, m_host.GetWorldPosition())) | 3621 | if (presence != null) |
3621 | presence.HealRate = (float)healrate; | 3622 | presence.HealRate = (float)healrate; |
3622 | } | 3623 | } |
3623 | 3624 | ||