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.
ThreadPoolClientBranch
alondria 2008-02-01 15:22:11 +00:00
parent 0eb4e85988
commit 43ecb1b4d2
1 changed files with 9 additions and 1 deletions

View File

@ -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: