Merge branch 'master' of /home/opensim/src/OpenSim

remove-scene-viewer
BlueWall 2011-10-26 08:48:46 -04:00
commit ae8786ea6b
2 changed files with 18 additions and 4 deletions

View File

@ -3325,12 +3325,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llTargetOmega(LSL_Vector axis, double spinrate, double gain) public void llTargetOmega(LSL_Vector axis, double spinrate, double gain)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
m_host.AngularVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); TargetOmega(m_host, axis, spinrate, gain);
m_host.ScheduleTerseUpdate();
m_host.SendTerseUpdateToAllClients();
m_host.ParentGroup.HasGroupChanged = true;
} }
protected void TargetOmega(SceneObjectPart part, LSL_Vector axis, double spinrate, double gain)
{
part.AngularVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate));
part.ScheduleTerseUpdate();
part.SendTerseUpdateToAllClients();
part.ParentGroup.HasGroupChanged = true;
}
public LSL_Integer llGetStartParameter() public LSL_Integer llGetStartParameter()
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
@ -7397,6 +7402,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
LSL_Rotation lr = rules.GetQuaternionItem(idx++); LSL_Rotation lr = rules.GetQuaternionItem(idx++);
SetRot(part, Rot2Quaternion(lr)); SetRot(part, Rot2Quaternion(lr));
break; break;
case (int)ScriptBaseClass.PRIM_OMEGA:
if (remain < 3)
return;
LSL_Vector axis = rules.GetVector3Item(idx++);
LSL_Float spinrate = rules.GetLSLFloatItem(idx++);
LSL_Float gain = rules.GetLSLFloatItem(idx++);
TargetOmega(part, axis, (double)spinrate, (double)gain);
break;
case (int)ScriptBaseClass.PRIM_LINK_TARGET: case (int)ScriptBaseClass.PRIM_LINK_TARGET:
if (remain < 3) // setting to 3 on the basis that parsing any usage of PRIM_LINK_TARGET that has nothing following it is pointless. if (remain < 3) // setting to 3 on the basis that parsing any usage of PRIM_LINK_TARGET that has nothing following it is pointless.
return; return;

View File

@ -321,6 +321,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public const int PRIM_NAME = 27; public const int PRIM_NAME = 27;
public const int PRIM_DESC = 28; public const int PRIM_DESC = 28;
public const int PRIM_ROT_LOCAL = 29; public const int PRIM_ROT_LOCAL = 29;
public const int PRIM_OMEGA = 32;
public const int PRIM_LINK_TARGET = 34; public const int PRIM_LINK_TARGET = 34;
public const int PRIM_TEXGEN_DEFAULT = 0; public const int PRIM_TEXGEN_DEFAULT = 0;
public const int PRIM_TEXGEN_PLANAR = 1; public const int PRIM_TEXGEN_PLANAR = 1;