aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs45
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs2
2 files changed, 9 insertions, 38 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index f0f8b18..3df94e8 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -4449,7 +4449,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4449 public void llSetSoundRadius(double radius) 4449 public void llSetSoundRadius(double radius)
4450 { 4450 {
4451 m_host.AddScriptLPS(1); 4451 m_host.AddScriptLPS(1);
4452 NotImplemented("llSetSoundRadius"); 4452 m_host.SoundRadius = radius;
4453 } 4453 }
4454 4454
4455 public string llKey2Name(string id) 4455 public string llKey2Name(string id)
@@ -4655,53 +4655,24 @@ namespace OpenSim.Region.ScriptEngine.Common
4655 public LSL_Types.Vector3 llGroundSlope(LSL_Types.Vector3 offset) 4655 public LSL_Types.Vector3 llGroundSlope(LSL_Types.Vector3 offset)
4656 { 4656 {
4657 m_host.AddScriptLPS(1); 4657 m_host.AddScriptLPS(1);
4658 4658 NotImplemented("llGroundSlope");
4659 Vector3 pos = m_host.AbsolutePosition + new Vector3((float)offset.x, 4659 return new LSL_Types.Vector3();
4660 (float)offset.y,
4661 (float)offset.z);
4662
4663 Vector3 p0 = new Vector3(pos.X, pos.Y,
4664 (float)llGround(
4665 new LSL_Types.Vector3(pos.X, pos.Y, pos.Z)
4666 ));
4667 Vector3 p1 = new Vector3(pos.X + 1, pos.Y,
4668 (float)llGround(
4669 new LSL_Types.Vector3(pos.X + 1, pos.Y, pos.Z)
4670 ));
4671 Vector3 p2 = new Vector3(pos.X, pos.Y + 1,
4672 (float)llGround(
4673 new LSL_Types.Vector3(pos.X, pos.Y + 1, pos.Z)
4674 ));
4675
4676 Vector3 v0 = new Vector3(
4677 p1.X - p0.X, p1.Y - p0.Y, p1.Z - p0.Z);
4678 Vector3 v1 = new Vector3(
4679 p2.X - p1.X, p2.Y - p1.Y, p2.Z - p1.Z);
4680
4681 v0.Normalize();
4682 v1.Normalize();
4683
4684 Vector3 tv = new Vector3();
4685 tv.X = (v0.Y * v1.Z) - (v0.Z * v1.Y);
4686 tv.Y = (v0.Z * v1.X) - (v0.X * v1.Z);
4687 tv.Z = (v0.X * v1.Y) - (v0.Y * v1.X);
4688
4689 return new LSL_Types.Vector3(tv.X, tv.Y, tv.Z);
4690 } 4660 }
4691 4661
4692 public LSL_Types.Vector3 llGroundNormal(LSL_Types.Vector3 offset) 4662 public LSL_Types.Vector3 llGroundNormal(LSL_Types.Vector3 offset)
4693 { 4663 {
4694 m_host.AddScriptLPS(1); 4664 m_host.AddScriptLPS(1);
4695 LSL_Types.Vector3 x = llGroundSlope(offset); 4665 NotImplemented("llGroundNormal");
4696 return new LSL_Types.Vector3(x.x, x.y, 1.0); 4666 return new LSL_Types.Vector3();
4697 } 4667 }
4698 4668
4699 public LSL_Types.Vector3 llGroundContour(LSL_Types.Vector3 offset) 4669 public LSL_Types.Vector3 llGroundContour(LSL_Types.Vector3 offset)
4700 { 4670 {
4701 m_host.AddScriptLPS(1); 4671 m_host.AddScriptLPS(1);
4702 LSL_Types.Vector3 x = llGroundSlope(offset); 4672 NotImplemented("llGroundContour");
4703 return new LSL_Types.Vector3(-x.y, x.x, 0.0); 4673 return new LSL_Types.Vector3();
4704 } 4674 }
4675
4705 public LSL_Types.LSLInteger llGetAttached() 4676 public LSL_Types.LSLInteger llGetAttached()
4706 { 4677 {
4707 m_host.AddScriptLPS(1); 4678 m_host.AddScriptLPS(1);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index b0996f5..1cde8d2 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4350,7 +4350,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4350 public void llSetSoundRadius(double radius) 4350 public void llSetSoundRadius(double radius)
4351 { 4351 {
4352 m_host.AddScriptLPS(1); 4352 m_host.AddScriptLPS(1);
4353 NotImplemented("llSetSoundRadius"); 4353 m_host.SoundRadius = radius;
4354 } 4354 }
4355 4355
4356 public string llKey2Name(string id) 4356 public string llKey2Name(string id)