Erm - make the distanc factor really work....

(wipes egg off face)
0.6.0-stable
Melanie Thielker 2008-08-27 19:12:17 +00:00
parent bc78a6335b
commit 1a3f83c94b
2 changed files with 2 additions and 2 deletions

View File

@ -1658,7 +1658,7 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
// Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos) // Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos)
LSL_Types.Vector3 currentPos = llGetLocalPos(); 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); targetPos = currentPos + m_distanceFactor * 10.0f * llVecNorm(targetPos - currentPos);
} }

View File

@ -1494,7 +1494,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
// Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos) // Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos)
LSL_Types.Vector3 currentPos = llGetLocalPos(); 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); targetPos = currentPos + m_ScriptDistanceFactor * 10 * llVecNorm(targetPos - currentPos);
} }