aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-03-14 22:26:37 +0000
committerJustin Clark-Casey (justincc)2013-03-14 22:26:37 +0000
commitf8c24b2a61e9f927620fee8e06457f70ba6e2e82 (patch)
treee75d7920b6c2d6d0b38b47458423414c22578c13
parentFix minor race conditions in llTeleportAgent(), llTeleportAgentGlobalCoords()... (diff)
downloadopensim-SC-f8c24b2a61e9f927620fee8e06457f70ba6e2e82.zip
opensim-SC-f8c24b2a61e9f927620fee8e06457f70ba6e2e82.tar.gz
opensim-SC-f8c24b2a61e9f927620fee8e06457f70ba6e2e82.tar.bz2
opensim-SC-f8c24b2a61e9f927620fee8e06457f70ba6e2e82.tar.xz
minor: Reuse ground LSL_Vector in llGroundSlope() rather than creating a new one.
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 8415feb..6414f35 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -6006,6 +6006,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6006 public LSL_Vector llGroundSlope(LSL_Vector offset) 6006 public LSL_Vector llGroundSlope(LSL_Vector offset)
6007 { 6007 {
6008 m_host.AddScriptLPS(1); 6008 m_host.AddScriptLPS(1);
6009
6009 //Get the slope normal. This gives us the equation of the plane tangent to the slope. 6010 //Get the slope normal. This gives us the equation of the plane tangent to the slope.
6010 LSL_Vector vsn = llGroundNormal(offset); 6011 LSL_Vector vsn = llGroundNormal(offset);
6011 6012
@@ -6016,7 +6017,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6016 vsl.Normalize(); 6017 vsl.Normalize();
6017 //Normalization might be overkill here 6018 //Normalization might be overkill here
6018 6019
6019 return new LSL_Vector(vsl.X, vsl.Y, vsl.Z); 6020 vsn.x = vsl.X;
6021 vsn.y = vsl.Y;
6022 vsn.z = vsl.Z;
6023
6024 return vsn;
6020 } 6025 }
6021 6026
6022 public LSL_Vector llGroundNormal(LSL_Vector offset) 6027 public LSL_Vector llGroundNormal(LSL_Vector offset)