Implements the r6005 foes for XEngine as well
parent
1ac6bb3107
commit
788dff7090
|
@ -67,6 +67,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
internal bool throwErrorOnNotImplemented = true;
|
internal bool throwErrorOnNotImplemented = true;
|
||||||
internal AsyncCommandManager AsyncCommands = null;
|
internal AsyncCommandManager AsyncCommands = null;
|
||||||
internal float m_ScriptDelayFactor = 1.0f;
|
internal float m_ScriptDelayFactor = 1.0f;
|
||||||
|
internal float m_ScriptDistanceFactor = 1.0f;
|
||||||
|
|
||||||
public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, LLUUID itemID)
|
public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, LLUUID itemID)
|
||||||
{
|
{
|
||||||
|
@ -81,6 +82,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
m_ScriptDelayFactor = config.Configs["XEngine"].
|
m_ScriptDelayFactor = config.Configs["XEngine"].
|
||||||
GetFloat("ScriptDelayFactor", 1.0f);
|
GetFloat("ScriptDelayFactor", 1.0f);
|
||||||
|
m_ScriptDistanceFactor = config.Configs["XEngine"].
|
||||||
|
GetFloat("ScriptDistanceLimitFactor", 1.0f);
|
||||||
|
|
||||||
AsyncCommands = (AsyncCommandManager)ScriptEngine.AsyncCommands;
|
AsyncCommands = (AsyncCommandManager)ScriptEngine.AsyncCommands;
|
||||||
}
|
}
|
||||||
|
@ -1493,7 +1496,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
LSL_Types.Vector3 currentPos = llGetLocalPos();
|
LSL_Types.Vector3 currentPos = llGetLocalPos();
|
||||||
if (llVecDist(currentPos, targetPos) > 10)
|
if (llVecDist(currentPos, targetPos) > 10)
|
||||||
{
|
{
|
||||||
targetPos = currentPos + 10 * llVecNorm(targetPos - currentPos);
|
targetPos = currentPos + m_ScriptDistanceFactor * 10 * llVecNorm(targetPos - currentPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (part.ParentID != 0)
|
if (part.ParentID != 0)
|
||||||
|
@ -2125,6 +2128,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
public void llRezAtRoot(string inventory, LSL_Types.Vector3 pos, LSL_Types.Vector3 vel, LSL_Types.Quaternion rot, int param)
|
public void llRezAtRoot(string inventory, LSL_Types.Vector3 pos, LSL_Types.Vector3 vel, LSL_Types.Quaternion rot, int param)
|
||||||
{
|
{
|
||||||
|
float dist = (float)llVecMag(llGetPos() - pos);
|
||||||
|
|
||||||
|
if(dist > m_ScriptDistanceFactor * 10.0f)
|
||||||
|
return;
|
||||||
|
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
|
|
|
@ -660,6 +660,8 @@ KillTimedOutScripts = false
|
||||||
AllowosConsoleCommand = false
|
AllowosConsoleCommand = false
|
||||||
; Sets the multiplier for the scripting delays
|
; Sets the multiplier for the scripting delays
|
||||||
ScriptDelayFactor = 1.0
|
ScriptDelayFactor = 1.0
|
||||||
|
; The factor the 10 m distances llimits are multiplied by
|
||||||
|
ScriptDistanceLimitFactor = 1.0
|
||||||
|
|
||||||
|
|
||||||
[GridInfo]
|
[GridInfo]
|
||||||
|
|
Loading…
Reference in New Issue