aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorBlueWall2011-10-26 08:48:46 -0400
committerBlueWall2011-10-26 08:48:46 -0400
commitae8786ea6ba80cab522a8ce4a2b6677c0b470e02 (patch)
treec6d5521d9853640bb81c80da50da6dda185f5047
parentAdd some things to .gitignore to make the status cleaner (diff)
parentImplementation of PRIM_OMEGA, but only for setting (diff)
downloadopensim-SC_OLD-ae8786ea6ba80cab522a8ce4a2b6677c0b470e02.zip
opensim-SC_OLD-ae8786ea6ba80cab522a8ce4a2b6677c0b470e02.tar.gz
opensim-SC_OLD-ae8786ea6ba80cab522a8ce4a2b6677c0b470e02.tar.bz2
opensim-SC_OLD-ae8786ea6ba80cab522a8ce4a2b6677c0b470e02.tar.xz
Merge branch 'master' of /home/opensim/src/OpenSim
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs21
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs1
2 files changed, 18 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;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index 50c18a8..ce4661c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -321,6 +321,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
321 public const int PRIM_NAME = 27; 321 public const int PRIM_NAME = 27;
322 public const int PRIM_DESC = 28; 322 public const int PRIM_DESC = 28;
323 public const int PRIM_ROT_LOCAL = 29; 323 public const int PRIM_ROT_LOCAL = 29;
324 public const int PRIM_OMEGA = 32;
324 public const int PRIM_LINK_TARGET = 34; 325 public const int PRIM_LINK_TARGET = 34;
325 public const int PRIM_TEXGEN_DEFAULT = 0; 326 public const int PRIM_TEXGEN_DEFAULT = 0;
326 public const int PRIM_TEXGEN_PLANAR = 1; 327 public const int PRIM_TEXGEN_PLANAR = 1;