aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs22
1 files changed, 9 insertions, 13 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 0ab2733..a6dca61 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -3014,20 +3014,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3014 3014
3015 UUID avatarId = new UUID(avatar); 3015 UUID avatarId = new UUID(avatar);
3016 ScenePresence presence = World.GetScenePresence(avatarId); 3016 ScenePresence presence = World.GetScenePresence(avatarId);
3017 Vector3 pos = m_host.GetWorldPosition(); 3017
3018 bool result = World.ScriptDanger(m_host.LocalId, new Vector3((float)pos.X, (float)pos.Y, (float)pos.Z)); 3018 if (presence != null && World.ScriptDanger(m_host.LocalId, m_host.GetWorldPosition()))
3019 if (result)
3020 { 3019 {
3021 if (presence != null) 3020 float health = presence.Health;
3022 { 3021 health += (float)healing;
3023 float health = presence.Health; 3022
3024 health += (float)healing; 3023 if (health >= 100)
3025 if (health >= 100) 3024 health = 100;
3026 { 3025
3027 health = 100; 3026 presence.setHealthWithUpdate(health);
3028 }
3029 presence.setHealthWithUpdate(health);
3030 }
3031 } 3027 }
3032 } 3028 }
3033 3029