diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 74ba4fa65e..9fdf3ce238 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -1658,7 +1658,7 @@ namespace OpenSim.Region.ScriptEngine.Common { // Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos) LSL_Types.Vector3 currentPos = llGetLocalPos(); - if (llVecDist(currentPos, targetPos) > 10) + if (llVecDist(currentPos, targetPos) > 10.0f * m_distanceFactor) { targetPos = currentPos + m_distanceFactor * 10.0f * llVecNorm(targetPos - currentPos); } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 46f6d8baf5..ccbbeb9a54 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -1494,7 +1494,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { // Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos) LSL_Types.Vector3 currentPos = llGetLocalPos(); - if (llVecDist(currentPos, targetPos) > 10) + if (llVecDist(currentPos, targetPos) > 10.0f * m_ScriptDistanceFactor) { targetPos = currentPos + m_ScriptDistanceFactor * 10 * llVecNorm(targetPos - currentPos); }