Guard LLRezObject against NaN
parent
592f98c4aa
commit
5d3fe9f8cd
|
@ -2318,6 +2318,8 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
public void llRezAtRoot(string inventory, LSL_Types.Vector3 pos, LSL_Types.Vector3 vel, LSL_Types.Quaternion rot, int param)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
if (Double.IsNaN(rot.x) || Double.IsNaN(rot.y) || Double.IsNaN(rot.z) || Double.IsNaN(rot.s))
|
||||
return;
|
||||
bool found = false;
|
||||
|
||||
float dist = (float)llVecDist(llGetPos(), pos);
|
||||
|
|
|
@ -2200,13 +2200,15 @@ 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)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
if (Double.IsNaN(rot.x) || Double.IsNaN(rot.y) || Double.IsNaN(rot.z) || Double.IsNaN(rot.s))
|
||||
return;
|
||||
float dist = (float)llVecMag(llGetPos() - pos);
|
||||
|
||||
if (dist > m_ScriptDistanceFactor * 10.0f)
|
||||
return;
|
||||
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
|
||||
{
|
||||
if (inv.Value.Name == inventory)
|
||||
|
|
Loading…
Reference in New Issue