Merge branch '0.6.9-post-fixes' of ssh://opensimulator.org/var/git/opensim into 0.6.9-post-fixes
commit
b2ef5658b1
|
@ -450,13 +450,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
|
||||
public LSL_Vector llVecNorm(LSL_Vector v)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
double mag = LSL_Vector.Mag(v);
|
||||
LSL_Vector nor = new LSL_Vector();
|
||||
nor.x = v.x / mag;
|
||||
nor.y = v.y / mag;
|
||||
nor.z = v.z / mag;
|
||||
return nor;
|
||||
m_host.AddScriptLPS(1);
|
||||
return LSL_Vector.Norm(v);
|
||||
}
|
||||
|
||||
public LSL_Float llVecDist(LSL_Vector a, LSL_Vector b)
|
||||
|
|
|
@ -257,12 +257,17 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
|||
public static double Mag(Vector3 v)
|
||||
{
|
||||
return Math.Sqrt(v.x * v.x + v.y * v.y + v.z * v.z);
|
||||
}
|
||||
|
||||
public static Vector3 Norm(Vector3 vector)
|
||||
{
|
||||
double mag = Mag(vector);
|
||||
return new Vector3(vector.x / mag, vector.y / mag, vector.z / mag);
|
||||
}
|
||||
|
||||
public static Vector3 Norm(Vector3 vector)
|
||||
{
|
||||
double mag = Mag(vector);
|
||||
if (mag > 0.0)
|
||||
{
|
||||
double invMag = 1.0 / mag;
|
||||
return vector * invMag;
|
||||
}
|
||||
return new Vector3(0, 0, 0);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -488,6 +488,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
|||
|
||||
if (stateSource == (int)StateSource.ScriptedRez)
|
||||
{
|
||||
lock (m_CompileDict)
|
||||
{
|
||||
m_CompileDict[itemID] = 0;
|
||||
}
|
||||
|
||||
DoOnRezScript(parms);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue