* 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.

This commit is contained in:
Teravus Ovares
2008-01-17 14:59:05 +00:00
parent 344b4d92f5
commit 18c959df12
4 changed files with 72 additions and 1 deletions

View File

@@ -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)