aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorUbitUmarov2017-10-26 19:01:16 +0100
committerUbitUmarov2017-10-26 19:01:16 +0100
commit16a8e166ff2f853d97df0e72c360c99ad7d7f43f (patch)
tree444f507e825e417ca2ad9c0bd37e2627625a8526 /OpenSim/Region/ScriptEngine
parentMerge branch 'master' into httptests (diff)
parentFixed typo in a comment. (diff)
downloadopensim-SC-16a8e166ff2f853d97df0e72c360c99ad7d7f43f.zip
opensim-SC-16a8e166ff2f853d97df0e72c360c99ad7d7f43f.tar.gz
opensim-SC-16a8e166ff2f853d97df0e72c360c99ad7d7f43f.tar.bz2
opensim-SC-16a8e166ff2f853d97df0e72c360c99ad7d7f43f.tar.xz
Merge branch 'master' into httptests
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs40
1 files changed, 20 insertions, 20 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index ba07f9c..6e28fe0 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -261,7 +261,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
261 } 261 }
262 262
263 // Returns if OSSL is enabled. Throws a script exception if OSSL is not allowed.. 263 // Returns if OSSL is enabled. Throws a script exception if OSSL is not allowed..
264 // for safe funtions always active 264 // for safe funtions always active
265 public void CheckThreatLevel() 265 public void CheckThreatLevel()
266 { 266 {
267 m_host.AddScriptLPS(1); 267 m_host.AddScriptLPS(1);
@@ -1056,7 +1056,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1056 targetID, 1056 targetID,
1057 part.SitTargetPosition); 1057 part.SitTargetPosition);
1058 } 1058 }
1059 1059
1060 // Get a list of all the avatars/agents in the region 1060 // Get a list of all the avatars/agents in the region
1061 public LSL_List osGetAgents() 1061 public LSL_List osGetAgents()
1062 { 1062 {
@@ -1074,7 +1074,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1074 1074
1075 public string osGetAgentIP(string agent) 1075 public string osGetAgentIP(string agent)
1076 { 1076 {
1077 CheckThreatLevel(ThreatLevel.Severe, "osGetAgentIP"); 1077 CheckThreatLevel(ThreatLevel.Severe, "osGetAgentIP");
1078 if(!(World.Permissions.IsGod(m_host.OwnerID))) // user god always needed 1078 if(!(World.Permissions.IsGod(m_host.OwnerID))) // user god always needed
1079 return ""; 1079 return "";
1080 1080
@@ -1651,7 +1651,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1651 else 1651 else
1652 { 1652 {
1653 if (UUID.TryParse(arg, out uuid)) 1653 if (UUID.TryParse(arg, out uuid))
1654 { 1654 {
1655 if(newLand.OwnerID != uuid) 1655 if(newLand.OwnerID != uuid)
1656 { 1656 {
1657 changed = true; 1657 changed = true;
@@ -1760,7 +1760,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1760 1760
1761 if(changedSeeAvs && avatar.currentParcelUUID == parcelID ) 1761 if(changedSeeAvs && avatar.currentParcelUUID == parcelID )
1762 avatar.currentParcelUUID = parcelID; // force parcel flags review 1762 avatar.currentParcelUUID = parcelID; // force parcel flags review
1763 1763
1764 if(avatar.ControllingClient == null) 1764 if(avatar.ControllingClient == null)
1765 return; 1765 return;
1766 1766
@@ -3593,7 +3593,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3593 3593
3594 public int osGetSimulatorMemoryKB() 3594 public int osGetSimulatorMemoryKB()
3595 { 3595 {
3596 CheckThreatLevel(ThreatLevel.Moderate, "osGetSimulatorMemory"); 3596 CheckThreatLevel(ThreatLevel.Moderate, "osGetSimulatorMemoryKB");
3597 3597
3598 long pws = System.Diagnostics.Process.GetCurrentProcess().WorkingSet64; 3598 long pws = System.Diagnostics.Process.GetCurrentProcess().WorkingSet64;
3599 3599
@@ -4500,7 +4500,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4500 /// LSL_Vector CenterOfMass, center mass relative to root prim 4500 /// LSL_Vector CenterOfMass, center mass relative to root prim
4501 /// LSL_Vector Inertia, elements of diagonal of inertia Ixx,Iyy,Izz divided by total mass 4501 /// LSL_Vector Inertia, elements of diagonal of inertia Ixx,Iyy,Izz divided by total mass
4502 /// LSL_Vector aux, elements of upper triagle of inertia Ixy (= Iyx), Ixz (= Izx), Iyz(= Izy) divided by total mass 4502 /// LSL_Vector aux, elements of upper triagle of inertia Ixy (= Iyx), Ixz (= Izx), Iyz(= Izy) divided by total mass
4503 /// </returns> 4503 /// </returns>
4504 public LSL_List osGetInertiaData() 4504 public LSL_List osGetInertiaData()
4505 { 4505 {
4506 CheckThreatLevel(); 4506 CheckThreatLevel();
@@ -4513,8 +4513,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4513 4513
4514 SceneObjectGroup sog = m_host.ParentGroup; 4514 SceneObjectGroup sog = m_host.ParentGroup;
4515 if(sog== null || sog.IsDeleted) 4515 if(sog== null || sog.IsDeleted)
4516 return result; 4516 return result;
4517 4517
4518 sog.GetInertiaData(out TotalMass, out CenterOfMass, out Inertia, out aux ); 4518 sog.GetInertiaData(out TotalMass, out CenterOfMass, out Inertia, out aux );
4519 if(TotalMass > 0) 4519 if(TotalMass > 0)
4520 { 4520 {
@@ -4538,7 +4538,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4538 /// <summary> 4538 /// <summary>
4539 /// set inertial data 4539 /// set inertial data
4540 /// replaces the automatic calculation of mass, center of mass and inertia 4540 /// replaces the automatic calculation of mass, center of mass and inertia
4541 /// 4541 ///
4542 /// </summary> 4542 /// </summary>
4543 /// <param name="Mass">total mass of linkset</param> 4543 /// <param name="Mass">total mass of linkset</param>
4544 /// <param name="centerOfMass">location of center of mass relative to root prim in local coords</param> 4544 /// <param name="centerOfMass">location of center of mass relative to root prim in local coords</param>
@@ -4562,7 +4562,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4562 // need more checks 4562 // need more checks
4563 4563
4564 Vector3 CenterOfMass = new Vector3((float)centerOfMass.x,(float)centerOfMass.y,(float)centerOfMass.z); 4564 Vector3 CenterOfMass = new Vector3((float)centerOfMass.x,(float)centerOfMass.y,(float)centerOfMass.z);
4565 Vector3 Inertia; 4565 Vector3 Inertia;
4566 float m = (float)mass; 4566 float m = (float)mass;
4567 4567
4568 Inertia.X = m * (float)principalInertiaScaled.x; 4568 Inertia.X = m * (float)principalInertiaScaled.x;
@@ -4578,7 +4578,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4578 /// <summary> 4578 /// <summary>
4579 /// set inertial data as a sphere 4579 /// set inertial data as a sphere
4580 /// replaces the automatic calculation of mass, center of mass and inertia 4580 /// replaces the automatic calculation of mass, center of mass and inertia
4581 /// 4581 ///
4582 /// </summary> 4582 /// </summary>
4583 /// <param name="Mass">total mass of linkset</param> 4583 /// <param name="Mass">total mass of linkset</param>
4584 /// <param name="boxsize">size of the Box</param> 4584 /// <param name="boxsize">size of the Box</param>
@@ -4600,7 +4600,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4600 // need more checks 4600 // need more checks
4601 4601
4602 Vector3 CenterOfMass = new Vector3((float)centerOfMass.x,(float)centerOfMass.y,(float)centerOfMass.z); 4602 Vector3 CenterOfMass = new Vector3((float)centerOfMass.x,(float)centerOfMass.y,(float)centerOfMass.z);
4603 Vector3 Inertia; 4603 Vector3 Inertia;
4604 float lx = (float)boxSize.x; 4604 float lx = (float)boxSize.x;
4605 float ly = (float)boxSize.y; 4605 float ly = (float)boxSize.y;
4606 float lz = (float)boxSize.z; 4606 float lz = (float)boxSize.z;
@@ -4620,7 +4620,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4620 /// <summary> 4620 /// <summary>
4621 /// set inertial data as a sphere 4621 /// set inertial data as a sphere
4622 /// replaces the automatic calculation of mass, center of mass and inertia 4622 /// replaces the automatic calculation of mass, center of mass and inertia
4623 /// 4623 ///
4624 /// </summary> 4624 /// </summary>
4625 /// <param name="Mass">total mass of linkset</param> 4625 /// <param name="Mass">total mass of linkset</param>
4626 /// <param name="radius">radius of the sphere</param> 4626 /// <param name="radius">radius of the sphere</param>
@@ -4639,9 +4639,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4639 return; 4639 return;
4640 4640
4641 // need more checks 4641 // need more checks
4642 4642
4643 Vector3 CenterOfMass = new Vector3((float)centerOfMass.x,(float)centerOfMass.y,(float)centerOfMass.z); 4643 Vector3 CenterOfMass = new Vector3((float)centerOfMass.x,(float)centerOfMass.y,(float)centerOfMass.z);
4644 Vector3 Inertia; 4644 Vector3 Inertia;
4645 float r = (float)radius; 4645 float r = (float)radius;
4646 float m = (float)mass; 4646 float m = (float)mass;
4647 float t = 0.4f * m * r * r; 4647 float t = 0.4f * m * r * r;
@@ -4656,7 +4656,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4656 /// <summary> 4656 /// <summary>
4657 /// set inertial data as a cylinder 4657 /// set inertial data as a cylinder
4658 /// replaces the automatic calculation of mass, center of mass and inertia 4658 /// replaces the automatic calculation of mass, center of mass and inertia
4659 /// 4659 ///
4660 /// </summary> 4660 /// </summary>
4661 /// <param name="Mass">total mass of linkset</param> 4661 /// <param name="Mass">total mass of linkset</param>
4662 /// <param name="radius">radius of the cylinder</param> 4662 /// <param name="radius">radius of the cylinder</param>
@@ -4678,9 +4678,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4678 return; 4678 return;
4679 4679
4680 // need more checks 4680 // need more checks
4681 4681
4682 Vector3 CenterOfMass = new Vector3((float)centerOfMass.x,(float)centerOfMass.y,(float)centerOfMass.z); 4682 Vector3 CenterOfMass = new Vector3((float)centerOfMass.x,(float)centerOfMass.y,(float)centerOfMass.z);
4683 Vector3 Inertia; 4683 Vector3 Inertia;
4684 float m = (float)mass; 4684 float m = (float)mass;
4685 float r = (float)radius; 4685 float r = (float)radius;
4686 r *= r; 4686 r *= r;
@@ -4702,7 +4702,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4702 /// <summary> 4702 /// <summary>
4703 /// removes inertial data manual override 4703 /// removes inertial data manual override
4704 /// default automatic calculation is used again 4704 /// default automatic calculation is used again
4705 /// 4705 ///
4706 /// </summary> 4706 /// </summary>
4707 public void osClearInertia() 4707 public void osClearInertia()
4708 { 4708 {