aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorUbitUmarov2017-04-03 17:19:28 +0100
committerUbitUmarov2017-04-03 17:19:28 +0100
commit2bb5e985740b7c6aa75cd31aa057d39d56f024b6 (patch)
treebbc3c48111f874ef69bf0bfb10f649293f824c0d /OpenSim/Region/ScriptEngine
parentadd bool CanObjectEnterWithScripts(SceneObjectGroup sog, ILandObject land) pe... (diff)
downloadopensim-SC_OLD-2bb5e985740b7c6aa75cd31aa057d39d56f024b6.zip
opensim-SC_OLD-2bb5e985740b7c6aa75cd31aa057d39d56f024b6.tar.gz
opensim-SC_OLD-2bb5e985740b7c6aa75cd31aa057d39d56f024b6.tar.bz2
opensim-SC_OLD-2bb5e985740b7c6aa75cd31aa057d39d56f024b6.tar.xz
add EXPERIMENTAL osObjectTeleport(LSL_Key objectUUID, LSL_Vector targetPos, LSL_Rotation rotation, LSL_Integer stop)
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs46
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs4
3 files changed, 52 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 6c094ee..ddf5078 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -4418,6 +4418,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4418 /// </returns> 4418 /// </returns>
4419 public LSL_List osGetInertiaData() 4419 public LSL_List osGetInertiaData()
4420 { 4420 {
4421 m_host.AddScriptLPS(1);
4422
4421 LSL_List result = new LSL_List(); 4423 LSL_List result = new LSL_List();
4422 float TotalMass; 4424 float TotalMass;
4423 Vector3 CenterOfMass; 4425 Vector3 CenterOfMass;
@@ -4463,6 +4465,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4463 4465
4464 public void osSetInertia(LSL_Float mass, LSL_Vector centerOfMass, LSL_Vector principalInertiaScaled, LSL_Rotation lslrot) 4466 public void osSetInertia(LSL_Float mass, LSL_Vector centerOfMass, LSL_Vector principalInertiaScaled, LSL_Rotation lslrot)
4465 { 4467 {
4468 m_host.AddScriptLPS(1);
4466 SceneObjectGroup sog = m_host.ParentGroup; 4469 SceneObjectGroup sog = m_host.ParentGroup;
4467 if(sog== null || sog.IsDeleted) 4470 if(sog== null || sog.IsDeleted)
4468 return; 4471 return;
@@ -4499,6 +4502,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4499 /// </remarks> 4502 /// </remarks>
4500 public void osSetInertiaAsBox(LSL_Float mass, LSL_Vector boxSize, LSL_Vector centerOfMass, LSL_Rotation lslrot) 4503 public void osSetInertiaAsBox(LSL_Float mass, LSL_Vector boxSize, LSL_Vector centerOfMass, LSL_Rotation lslrot)
4501 { 4504 {
4505 m_host.AddScriptLPS(1);
4506
4502 SceneObjectGroup sog = m_host.ParentGroup; 4507 SceneObjectGroup sog = m_host.ParentGroup;
4503 if(sog== null || sog.IsDeleted) 4508 if(sog== null || sog.IsDeleted)
4504 return; 4509 return;
@@ -4538,6 +4543,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4538 /// </remarks> 4543 /// </remarks>
4539 public void osSetInertiaAsSphere(LSL_Float mass, LSL_Float radius, LSL_Vector centerOfMass) 4544 public void osSetInertiaAsSphere(LSL_Float mass, LSL_Float radius, LSL_Vector centerOfMass)
4540 { 4545 {
4546 m_host.AddScriptLPS(1);
4541 SceneObjectGroup sog = m_host.ParentGroup; 4547 SceneObjectGroup sog = m_host.ParentGroup;
4542 if(sog== null || sog.IsDeleted) 4548 if(sog== null || sog.IsDeleted)
4543 return; 4549 return;
@@ -4575,6 +4581,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4575 /// </remarks> 4581 /// </remarks>
4576 public void osSetInertiaAsCylinder(LSL_Float mass, LSL_Float radius, LSL_Float lenght, LSL_Vector centerOfMass, LSL_Rotation lslrot) 4582 public void osSetInertiaAsCylinder(LSL_Float mass, LSL_Float radius, LSL_Float lenght, LSL_Vector centerOfMass, LSL_Rotation lslrot)
4577 { 4583 {
4584 m_host.AddScriptLPS(1);
4578 SceneObjectGroup sog = m_host.ParentGroup; 4585 SceneObjectGroup sog = m_host.ParentGroup;
4579 if(sog== null || sog.IsDeleted) 4586 if(sog== null || sog.IsDeleted)
4580 return; 4587 return;
@@ -4611,11 +4618,50 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4611 /// </summary> 4618 /// </summary>
4612 public void osClearInertia() 4619 public void osClearInertia()
4613 { 4620 {
4621 m_host.AddScriptLPS(1);
4614 SceneObjectGroup sog = m_host.ParentGroup; 4622 SceneObjectGroup sog = m_host.ParentGroup;
4615 if(sog== null || sog.IsDeleted) 4623 if(sog== null || sog.IsDeleted)
4616 return; 4624 return;
4617 4625
4618 sog.SetInertiaData(-1, Vector3.Zero, Vector3.Zero, Vector4.Zero ); 4626 sog.SetInertiaData(-1, Vector3.Zero, Vector3.Zero, Vector4.Zero );
4619 } 4627 }
4628
4629 /// <summary>
4630 /// teleports a object (full linkset)
4631 /// </summary>
4632 /// <param name="objectUUID">the id of the linkset to teleport</param>
4633 /// <param name="targetPos">target position</param>
4634 /// <param name="rotation"> a rotation to apply</param>
4635 /// <param name="stop">if TRUE (!=0) stop at destination</param>
4636 /// <remarks>
4637 /// only does teleport local to region
4638 /// object owner must have rights to run scripts on target location
4639 /// object owner must have rights to enter ojects on target location
4640 /// target location parcel must have enought free prims capacity for the linkset prims
4641 /// all avatars siting on the object must have access to target location
4642 /// has a cool down time. retries before expire reset it
4643 /// fail conditions are silent ignored
4644 /// </remarks>
4645 public void osObjectTeleport(LSL_Key objectUUID, LSL_Vector targetPos, LSL_Rotation rotation, LSL_Integer stop)
4646 {
4647 CheckThreatLevel(ThreatLevel.Severe, "osTeleportAgent");
4648 m_host.AddScriptLPS(1);
4649
4650 UUID objUUID;
4651 if (!UUID.TryParse(objectUUID, out objUUID))
4652 {
4653 OSSLShoutError("osObjectTeleport() invalid object Key");
4654 return;
4655 }
4656
4657 SceneObjectGroup sog = World.GetSceneObjectGroup(objUUID);
4658 if(sog== null || sog.IsDeleted)
4659 return;
4660
4661 UUID myid = m_host.ParentGroup.UUID;
4662
4663 sog.ObjectTeleport(myid, targetPos, rotation, stop != 0);
4664 // a delay here may break vehicles
4665 }
4620 } 4666 }
4621} 4667}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index f76ff7f..4722fed 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -495,5 +495,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
495 void osSetInertiaAsBox(LSL_Float mass, vector boxSize, vector centerOfMass, rotation rot); 495 void osSetInertiaAsBox(LSL_Float mass, vector boxSize, vector centerOfMass, rotation rot);
496 void osSetInertiaAsSphere(LSL_Float mass, LSL_Float radius, vector centerOfMass); 496 void osSetInertiaAsSphere(LSL_Float mass, LSL_Float radius, vector centerOfMass);
497 void osSetInertiaAsCylinder(LSL_Float mass, LSL_Float radius, LSL_Float lenght, vector centerOfMass,rotation lslrot); 497 void osSetInertiaAsCylinder(LSL_Float mass, LSL_Float radius, LSL_Float lenght, vector centerOfMass,rotation lslrot);
498
499 void osObjectTeleport(LSL_Key objectUUID, vector targetPos, rotation targetrotation, LSL_Integer stop);
498 } 500 }
499} 501}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index 09337e5..37e7a17 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -1140,5 +1140,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
1140 m_OSSL_Functions.osClearInertia(); 1140 m_OSSL_Functions.osClearInertia();
1141 } 1141 }
1142 1142
1143 public void osObjectTeleport(LSL_Key objectUUID, vector targetPos, rotation targetrotation, LSL_Integer stop)
1144 {
1145 m_OSSL_Functions.osObjectTeleport(objectUUID, targetPos, targetrotation, stop);
1146 }
1143 } 1147 }
1144} 1148}