aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie Thielker2008-08-27 17:19:56 +0000
committerMelanie Thielker2008-08-27 17:19:56 +0000
commit788dff7090774b5544963a41a129d1c0d29df56c (patch)
tree0f326559766330314a5d1ff6e4c76286c9f68dc0 /OpenSim
parentAdd ScriptDistanceLimitFactor to OpenSim.ini to allow modifcation of (diff)
downloadopensim-SC-788dff7090774b5544963a41a129d1c0d29df56c.zip
opensim-SC-788dff7090774b5544963a41a129d1c0d29df56c.tar.gz
opensim-SC-788dff7090774b5544963a41a129d1c0d29df56c.tar.bz2
opensim-SC-788dff7090774b5544963a41a129d1c0d29df56c.tar.xz
Implements the r6005 foes for XEngine as well
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs10
1 files changed, 9 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 2b99ce6..46f6d8b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -67,6 +67,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
67 internal bool throwErrorOnNotImplemented = true; 67 internal bool throwErrorOnNotImplemented = true;
68 internal AsyncCommandManager AsyncCommands = null; 68 internal AsyncCommandManager AsyncCommands = null;
69 internal float m_ScriptDelayFactor = 1.0f; 69 internal float m_ScriptDelayFactor = 1.0f;
70 internal float m_ScriptDistanceFactor = 1.0f;
70 71
71 public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, LLUUID itemID) 72 public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, LLUUID itemID)
72 { 73 {
@@ -81,6 +82,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
81 82
82 m_ScriptDelayFactor = config.Configs["XEngine"]. 83 m_ScriptDelayFactor = config.Configs["XEngine"].
83 GetFloat("ScriptDelayFactor", 1.0f); 84 GetFloat("ScriptDelayFactor", 1.0f);
85 m_ScriptDistanceFactor = config.Configs["XEngine"].
86 GetFloat("ScriptDistanceLimitFactor", 1.0f);
84 87
85 AsyncCommands = (AsyncCommandManager)ScriptEngine.AsyncCommands; 88 AsyncCommands = (AsyncCommandManager)ScriptEngine.AsyncCommands;
86 } 89 }
@@ -1493,7 +1496,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1493 LSL_Types.Vector3 currentPos = llGetLocalPos(); 1496 LSL_Types.Vector3 currentPos = llGetLocalPos();
1494 if (llVecDist(currentPos, targetPos) > 10) 1497 if (llVecDist(currentPos, targetPos) > 10)
1495 { 1498 {
1496 targetPos = currentPos + 10 * llVecNorm(targetPos - currentPos); 1499 targetPos = currentPos + m_ScriptDistanceFactor * 10 * llVecNorm(targetPos - currentPos);
1497 } 1500 }
1498 1501
1499 if (part.ParentID != 0) 1502 if (part.ParentID != 0)
@@ -2125,6 +2128,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2125 2128
2126 public void llRezAtRoot(string inventory, LSL_Types.Vector3 pos, LSL_Types.Vector3 vel, LSL_Types.Quaternion rot, int param) 2129 public void llRezAtRoot(string inventory, LSL_Types.Vector3 pos, LSL_Types.Vector3 vel, LSL_Types.Quaternion rot, int param)
2127 { 2130 {
2131 float dist = (float)llVecMag(llGetPos() - pos);
2132
2133 if(dist > m_ScriptDistanceFactor * 10.0f)
2134 return;
2135
2128 m_host.AddScriptLPS(1); 2136 m_host.AddScriptLPS(1);
2129 bool found = false; 2137 bool found = false;
2130 2138