diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index fe8d358..82701ce 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3325,12 +3325,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3325 | public void llTargetOmega(LSL_Vector axis, double spinrate, double gain) | 3325 | public void llTargetOmega(LSL_Vector axis, double spinrate, double gain) |
3326 | { | 3326 | { |
3327 | m_host.AddScriptLPS(1); | 3327 | m_host.AddScriptLPS(1); |
3328 | m_host.AngularVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); | 3328 | TargetOmega(m_host, axis, spinrate, gain); |
3329 | m_host.ScheduleTerseUpdate(); | ||
3330 | m_host.SendTerseUpdateToAllClients(); | ||
3331 | m_host.ParentGroup.HasGroupChanged = true; | ||
3332 | } | 3329 | } |
3333 | 3330 | ||
3331 | protected void TargetOmega(SceneObjectPart part, LSL_Vector axis, double spinrate, double gain) | ||
3332 | { | ||
3333 | part.AngularVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); | ||
3334 | part.ScheduleTerseUpdate(); | ||
3335 | part.SendTerseUpdateToAllClients(); | ||
3336 | part.ParentGroup.HasGroupChanged = true; | ||
3337 | } | ||
3338 | |||
3334 | public LSL_Integer llGetStartParameter() | 3339 | public LSL_Integer llGetStartParameter() |
3335 | { | 3340 | { |
3336 | m_host.AddScriptLPS(1); | 3341 | m_host.AddScriptLPS(1); |
@@ -7397,6 +7402,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7397 | LSL_Rotation lr = rules.GetQuaternionItem(idx++); | 7402 | LSL_Rotation lr = rules.GetQuaternionItem(idx++); |
7398 | SetRot(part, Rot2Quaternion(lr)); | 7403 | SetRot(part, Rot2Quaternion(lr)); |
7399 | break; | 7404 | break; |
7405 | case (int)ScriptBaseClass.PRIM_OMEGA: | ||
7406 | if (remain < 3) | ||
7407 | return; | ||
7408 | LSL_Vector axis = rules.GetVector3Item(idx++); | ||
7409 | LSL_Float spinrate = rules.GetLSLFloatItem(idx++); | ||
7410 | LSL_Float gain = rules.GetLSLFloatItem(idx++); | ||
7411 | TargetOmega(part, axis, (double)spinrate, (double)gain); | ||
7412 | break; | ||
7400 | case (int)ScriptBaseClass.PRIM_LINK_TARGET: | 7413 | case (int)ScriptBaseClass.PRIM_LINK_TARGET: |
7401 | if (remain < 3) // setting to 3 on the basis that parsing any usage of PRIM_LINK_TARGET that has nothing following it is pointless. | 7414 | if (remain < 3) // setting to 3 on the basis that parsing any usage of PRIM_LINK_TARGET that has nothing following it is pointless. |
7402 | return; | 7415 | return; |