diff options
author | Melanie Thielker | 2008-09-19 17:34:35 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-09-19 17:34:35 +0000 |
commit | 5d3fe9f8cdcb6c7b6e43ec817b3c955d36f7fcee (patch) | |
tree | 9342e126af65c3781b450e35c7fd4fc3c68c45fc /OpenSim/Region/ScriptEngine/Shared | |
parent | Mantis #2217 (diff) | |
download | opensim-SC_OLD-5d3fe9f8cdcb6c7b6e43ec817b3c955d36f7fcee.zip opensim-SC_OLD-5d3fe9f8cdcb6c7b6e43ec817b3c955d36f7fcee.tar.gz opensim-SC_OLD-5d3fe9f8cdcb6c7b6e43ec817b3c955d36f7fcee.tar.bz2 opensim-SC_OLD-5d3fe9f8cdcb6c7b6e43ec817b3c955d36f7fcee.tar.xz |
Guard LLRezObject against NaN
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index bff63f1..0cfa06f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2200,13 +2200,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2200 | 2200 | ||
2201 | public void llRezAtRoot(string inventory, LSL_Types.Vector3 pos, LSL_Types.Vector3 vel, LSL_Types.Quaternion rot, int param) | 2201 | public void llRezAtRoot(string inventory, LSL_Types.Vector3 pos, LSL_Types.Vector3 vel, LSL_Types.Quaternion rot, int param) |
2202 | { | 2202 | { |
2203 | m_host.AddScriptLPS(1); | ||
2204 | |||
2205 | if (Double.IsNaN(rot.x) || Double.IsNaN(rot.y) || Double.IsNaN(rot.z) || Double.IsNaN(rot.s)) | ||
2206 | return; | ||
2203 | float dist = (float)llVecMag(llGetPos() - pos); | 2207 | float dist = (float)llVecMag(llGetPos() - pos); |
2204 | 2208 | ||
2205 | if (dist > m_ScriptDistanceFactor * 10.0f) | 2209 | if (dist > m_ScriptDistanceFactor * 10.0f) |
2206 | return; | 2210 | return; |
2207 | 2211 | ||
2208 | m_host.AddScriptLPS(1); | ||
2209 | |||
2210 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) | 2212 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) |
2211 | { | 2213 | { |
2212 | if (inv.Value.Name == inventory) | 2214 | if (inv.Value.Name == inventory) |