From c1e239dedce6ce91cdfcd8c20108144b01df724d Mon Sep 17 00:00:00 2001 From: Dahlia Trimble Date: Fri, 25 Jul 2008 02:06:40 +0000 Subject: llApplyImpulse now accepts any non-zero integer as not FALSE --- .../Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 16 ++++------------ .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 10 +--------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index d7fd2c5..2ef5c47 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -1659,21 +1659,13 @@ namespace OpenSim.Region.ScriptEngine.Common //No energy force yet if (force.x > 20000) - force.x = 20000; + force.x = 20000; if (force.y > 20000) - force.y = 20000; + force.y = 20000; if (force.z > 20000) - force.z = 20000; + force.z = 20000; - if (local == 1) - { - m_host.ApplyImpulse(new LLVector3((float)force.x, (float)force.y, (float)force.z), true); - } - else - { - - m_host.ApplyImpulse(new LLVector3((float)force.x,(float)force.y,(float)force.z), false); - } + m_host.ApplyImpulse(new LLVector3((float)force.x, (float)force.y, (float)force.z), local != 0); } public void llApplyRotationalImpulse(LSL_Types.Vector3 force, int local) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 201308d..c9c4026 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -1517,15 +1517,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (force.z > 20000) force.z = 20000; - if (local == 1) - { - m_host.ApplyImpulse(new LLVector3((float)force.x, (float)force.y, (float)force.z), true); - } - else - { - - m_host.ApplyImpulse(new LLVector3((float)force.x,(float)force.y,(float)force.z), false); - } + m_host.ApplyImpulse(new LLVector3((float)force.x, (float)force.y, (float)force.z), local != 0); } public void llApplyRotationalImpulse(LSL_Types.Vector3 force, int local) -- cgit v1.1