From 18c959df12983256d73240a86fa0bad12c4e36ce Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Thu, 17 Jan 2008 14:59:05 +0000 Subject: * Added llApplyImpulse in the global frame. The object must be physical before this'll do anything. Be careful with this function as it's easy to loose prim. --- .../Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 1400617..c196322 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -792,7 +792,22 @@ namespace OpenSim.Region.ScriptEngine.Common public void llApplyImpulse(LSL_Types.Vector3 force, int local) { - NotImplemented("llApplyImpulse"); + //No energy force yet + if (local == 1) + { + NotImplemented("llApplyImpulse Local Force"); + } + else + { + if (force.x > 20000) + force.x = 20000; + if (force.y > 20000) + force.y = 20000; + if (force.z > 20000) + force.z = 20000; + + m_host.ApplyImpulse(new LLVector3((float)force.x,(float)force.y,(float)force.z)); + } } public void llApplyRotationalImpulse(LSL_Types.Vector3 force, int local) -- cgit v1.1