From 43ecb1b4d2ab230c7a860e291f9fa278c76617a6 Mon Sep 17 00:00:00 2001 From: alondria Date: Fri, 1 Feb 2008 15:22:11 +0000 Subject: [PATCH] Fixed errors being thrown by invalid PSYS_SRC_TARGET_KEY's in llParticleSystem - defaults to source prim (consistent with LL grid). Should fix mantis 427. --- .../Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 91cddf1ff9..df049d8f85 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -2254,7 +2254,15 @@ namespace OpenSim.Region.ScriptEngine.Common break; case (int)LSL_BaseClass.PSYS_SRC_TARGET_KEY: - prules.Target = new LLUUID(rules.Data[i + 1].ToString()); + LLUUID key = LLUUID.Zero; + if (LLUUID.TryParse(rules.Data[i + 1].ToString(), out key)) + { + prules.Target = key; + } + else + { + prules.Target = m_host.UUID; + } break; case (int)LSL_BaseClass.PSYS_SRC_OMEGA: