aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorRobert Adams2013-07-06 09:53:30 -0700
committerRobert Adams2013-07-06 09:53:30 -0700
commitd838f15d97d5ae400af86aa52c9ea68f0ba299bb (patch)
tree2f5320f26c89d74aa6ef1ba02e841657be6bbf2f
parentBulletSim: implementation of linkset center-of-mass. (diff)
downloadopensim-SC-d838f15d97d5ae400af86aa52c9ea68f0ba299bb.zip
opensim-SC-d838f15d97d5ae400af86aa52c9ea68f0ba299bb.tar.gz
opensim-SC-d838f15d97d5ae400af86aa52c9ea68f0ba299bb.tar.bz2
opensim-SC-d838f15d97d5ae400af86aa52c9ea68f0ba299bb.tar.xz
Add implementations for llSetVelocity and llSetAngularVelocity.
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs26
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs10
3 files changed, 38 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index c0b8373..34e2b4d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2382,6 +2382,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2382 return force; 2382 return force;
2383 } 2383 }
2384 2384
2385 public void llSetVelocity(LSL_Vector velocity, int local)
2386 {
2387 m_host.AddScriptLPS(1);
2388
2389 if (!m_host.ParentGroup.IsDeleted)
2390 {
2391 if (local != 0)
2392 velocity *= llGetRot();
2393
2394 m_host.ParentGroup.RootPart.Velocity = velocity;
2395 }
2396 }
2397
2398 public void llSetAngularVelocity(LSL_Vector angularVelocity, int local)
2399 {
2400 m_host.AddScriptLPS(1);
2401
2402 if (!m_host.ParentGroup.IsDeleted)
2403 {
2404 if (local != 0)
2405 angularVelocity *= llGetRot();
2406
2407 m_host.ParentGroup.RootPart.AngularVelocity = angularVelocity;
2408 }
2409 }
2410
2385 public LSL_Integer llTarget(LSL_Vector position, double range) 2411 public LSL_Integer llTarget(LSL_Vector position, double range)
2386 { 2412 {
2387 m_host.AddScriptLPS(1); 2413 m_host.AddScriptLPS(1);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
index ff13ee6..340edb3 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
@@ -342,6 +342,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
342 void llSetDamage(double damage); 342 void llSetDamage(double damage);
343 void llSetForce(LSL_Vector force, int local); 343 void llSetForce(LSL_Vector force, int local);
344 void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local); 344 void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local);
345 void llSetVelocity(LSL_Vector velocity, int local);
346 void llSetAngularVelocity(LSL_Vector angularVelocity, int local);
345 void llSetHoverHeight(double height, int water, double tau); 347 void llSetHoverHeight(double height, int water, double tau);
346 void llSetInventoryPermMask(string item, int mask, int value); 348 void llSetInventoryPermMask(string item, int mask, int value);
347 void llSetLinkAlpha(int linknumber, double alpha, int face); 349 void llSetLinkAlpha(int linknumber, double alpha, int face);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
index 87cc342..7cd17e7 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
@@ -1548,6 +1548,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
1548 m_LSL_Functions.llSetForceAndTorque(force, torque, local); 1548 m_LSL_Functions.llSetForceAndTorque(force, torque, local);
1549 } 1549 }
1550 1550
1551 public void llSetVelocity(LSL_Vector force, int local)
1552 {
1553 m_LSL_Functions.llSetVelocity(force, local);
1554 }
1555
1556 public void llSetAngularVelocity(LSL_Vector force, int local)
1557 {
1558 m_LSL_Functions.llSetAngularVelocity(force, local);
1559 }
1560
1551 public void llSetHoverHeight(double height, int water, double tau) 1561 public void llSetHoverHeight(double height, int water, double tau)
1552 { 1562 {
1553 m_LSL_Functions.llSetHoverHeight(height, water, tau); 1563 m_LSL_Functions.llSetHoverHeight(height, water, tau);