aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorSignpostMarv2012-08-15 21:14:39 +0100
committerMelanie2012-08-15 22:58:33 +0100
commit0aa1f1cc3f9f6556e470329cfb7982a774077444 (patch)
tree7494ca1f1ba7b5ab8b417b2dafc4b8bbba343476 /OpenSim/Region/ScriptEngine
parentLet the temp attachment module add a command to allow attaching without permi... (diff)
downloadopensim-SC_OLD-0aa1f1cc3f9f6556e470329cfb7982a774077444.zip
opensim-SC_OLD-0aa1f1cc3f9f6556e470329cfb7982a774077444.tar.gz
opensim-SC_OLD-0aa1f1cc3f9f6556e470329cfb7982a774077444.tar.bz2
opensim-SC_OLD-0aa1f1cc3f9f6556e470329cfb7982a774077444.tar.xz
Implementing PRIM_LINK_TARGET in a non-recursive fashion
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs123
1 files changed, 74 insertions, 49 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 8b53edc..55567d1 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -244,32 +244,37 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
244 244
245 public List<SceneObjectPart> GetLinkParts(int linkType) 245 public List<SceneObjectPart> GetLinkParts(int linkType)
246 { 246 {
247 return GetLinkParts(m_host, linkType);
248 }
249
250 private List<SceneObjectPart> GetLinkParts(SceneObjectPart part, int linkType)
251 {
247 List<SceneObjectPart> ret = new List<SceneObjectPart>(); 252 List<SceneObjectPart> ret = new List<SceneObjectPart>();
248 ret.Add(m_host); 253 ret.Add(part);
249 254
250 switch (linkType) 255 switch (linkType)
251 { 256 {
252 case ScriptBaseClass.LINK_SET: 257 case ScriptBaseClass.LINK_SET:
253 return new List<SceneObjectPart>(m_host.ParentGroup.Parts); 258 return new List<SceneObjectPart>(part.ParentGroup.Parts);
254 259
255 case ScriptBaseClass.LINK_ROOT: 260 case ScriptBaseClass.LINK_ROOT:
256 ret = new List<SceneObjectPart>(); 261 ret = new List<SceneObjectPart>();
257 ret.Add(m_host.ParentGroup.RootPart); 262 ret.Add(part.ParentGroup.RootPart);
258 return ret; 263 return ret;
259 264
260 case ScriptBaseClass.LINK_ALL_OTHERS: 265 case ScriptBaseClass.LINK_ALL_OTHERS:
261 ret = new List<SceneObjectPart>(m_host.ParentGroup.Parts); 266 ret = new List<SceneObjectPart>(part.ParentGroup.Parts);
262 267
263 if (ret.Contains(m_host)) 268 if (ret.Contains(part))
264 ret.Remove(m_host); 269 ret.Remove(part);
265 270
266 return ret; 271 return ret;
267 272
268 case ScriptBaseClass.LINK_ALL_CHILDREN: 273 case ScriptBaseClass.LINK_ALL_CHILDREN:
269 ret = new List<SceneObjectPart>(m_host.ParentGroup.Parts); 274 ret = new List<SceneObjectPart>(part.ParentGroup.Parts);
270 275
271 if (ret.Contains(m_host.ParentGroup.RootPart)) 276 if (ret.Contains(part.ParentGroup.RootPart))
272 ret.Remove(m_host.ParentGroup.RootPart); 277 ret.Remove(part.ParentGroup.RootPart);
273 return ret; 278 return ret;
274 279
275 case ScriptBaseClass.LINK_THIS: 280 case ScriptBaseClass.LINK_THIS:
@@ -279,7 +284,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
279 if (linkType < 0) 284 if (linkType < 0)
280 return new List<SceneObjectPart>(); 285 return new List<SceneObjectPart>();
281 286
282 SceneObjectPart target = m_host.ParentGroup.GetLinkNumPart(linkType); 287 SceneObjectPart target = part.ParentGroup.GetLinkNumPart(linkType);
283 if (target == null) 288 if (target == null)
284 return new List<SceneObjectPart>(); 289 return new List<SceneObjectPart>();
285 ret = new List<SceneObjectPart>(); 290 ret = new List<SceneObjectPart>();
@@ -7254,7 +7259,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7254 public void llSetPrimitiveParams(LSL_List rules) 7259 public void llSetPrimitiveParams(LSL_List rules)
7255 { 7260 {
7256 m_host.AddScriptLPS(1); 7261 m_host.AddScriptLPS(1);
7257 SetPrimParams(m_host, rules); 7262
7263 setLinkPrimParams(ScriptBaseClass.LINK_THIS, rules);
7258 7264
7259 ScriptSleep(200); 7265 ScriptSleep(200);
7260 } 7266 }
@@ -7279,11 +7285,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7279 { 7285 {
7280 List<SceneObjectPart> parts = GetLinkParts(linknumber); 7286 List<SceneObjectPart> parts = GetLinkParts(linknumber);
7281 7287
7288 LSL_List remaining = null;
7289
7282 foreach (SceneObjectPart part in parts) 7290 foreach (SceneObjectPart part in parts)
7283 SetPrimParams(part, rules); 7291 remaining = SetPrimParams(part, rules);
7292
7293 while(remaining != null && remaining.Length > 2)
7294 {
7295 linknumber = remaining.GetLSLIntegerItem(0);
7296 rules = remaining.GetSublist(1,-1);
7297 parts = GetLinkParts(linknumber);
7298
7299 foreach (SceneObjectPart part in parts)
7300 remaining = SetPrimParams(part, rules);
7301 }
7284 } 7302 }
7285 7303
7286 protected void SetPrimParams(SceneObjectPart part, LSL_List rules) 7304 protected LSL_List SetPrimParams(SceneObjectPart part, LSL_List rules)
7287 { 7305 {
7288 int idx = 0; 7306 int idx = 0;
7289 7307
@@ -7306,7 +7324,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7306 case (int)ScriptBaseClass.PRIM_POSITION: 7324 case (int)ScriptBaseClass.PRIM_POSITION:
7307 case (int)ScriptBaseClass.PRIM_POS_LOCAL: 7325 case (int)ScriptBaseClass.PRIM_POS_LOCAL:
7308 if (remain < 1) 7326 if (remain < 1)
7309 return; 7327 return null;
7310 7328
7311 v=rules.GetVector3Item(idx++); 7329 v=rules.GetVector3Item(idx++);
7312 positionChanged = true; 7330 positionChanged = true;
@@ -7315,7 +7333,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7315 break; 7333 break;
7316 case (int)ScriptBaseClass.PRIM_SIZE: 7334 case (int)ScriptBaseClass.PRIM_SIZE:
7317 if (remain < 1) 7335 if (remain < 1)
7318 return; 7336 return null;
7319 7337
7320 v=rules.GetVector3Item(idx++); 7338 v=rules.GetVector3Item(idx++);
7321 SetScale(part, v); 7339 SetScale(part, v);
@@ -7323,7 +7341,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7323 break; 7341 break;
7324 case (int)ScriptBaseClass.PRIM_ROTATION: 7342 case (int)ScriptBaseClass.PRIM_ROTATION:
7325 if (remain < 1) 7343 if (remain < 1)
7326 return; 7344 return null;
7327 7345
7328 LSL_Rotation q = rules.GetQuaternionItem(idx++); 7346 LSL_Rotation q = rules.GetQuaternionItem(idx++);
7329 // try to let this work as in SL... 7347 // try to let this work as in SL...
@@ -7343,7 +7361,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7343 7361
7344 case (int)ScriptBaseClass.PRIM_TYPE: 7362 case (int)ScriptBaseClass.PRIM_TYPE:
7345 if (remain < 3) 7363 if (remain < 3)
7346 return; 7364 return null;
7347 7365
7348 code = (int)rules.GetLSLIntegerItem(idx++); 7366 code = (int)rules.GetLSLIntegerItem(idx++);
7349 7367
@@ -7362,7 +7380,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7362 { 7380 {
7363 case (int)ScriptBaseClass.PRIM_TYPE_BOX: 7381 case (int)ScriptBaseClass.PRIM_TYPE_BOX:
7364 if (remain < 6) 7382 if (remain < 6)
7365 return; 7383 return null;
7366 7384
7367 face = (int)rules.GetLSLIntegerItem(idx++); 7385 face = (int)rules.GetLSLIntegerItem(idx++);
7368 v = rules.GetVector3Item(idx++); // cut 7386 v = rules.GetVector3Item(idx++); // cut
@@ -7377,7 +7395,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7377 7395
7378 case (int)ScriptBaseClass.PRIM_TYPE_CYLINDER: 7396 case (int)ScriptBaseClass.PRIM_TYPE_CYLINDER:
7379 if (remain < 6) 7397 if (remain < 6)
7380 return; 7398 return null;
7381 7399
7382 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape 7400 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape
7383 v = rules.GetVector3Item(idx++); // cut 7401 v = rules.GetVector3Item(idx++); // cut
@@ -7391,7 +7409,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7391 7409
7392 case (int)ScriptBaseClass.PRIM_TYPE_PRISM: 7410 case (int)ScriptBaseClass.PRIM_TYPE_PRISM:
7393 if (remain < 6) 7411 if (remain < 6)
7394 return; 7412 return null;
7395 7413
7396 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape 7414 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape
7397 v = rules.GetVector3Item(idx++); //cut 7415 v = rules.GetVector3Item(idx++); //cut
@@ -7405,7 +7423,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7405 7423
7406 case (int)ScriptBaseClass.PRIM_TYPE_SPHERE: 7424 case (int)ScriptBaseClass.PRIM_TYPE_SPHERE:
7407 if (remain < 5) 7425 if (remain < 5)
7408 return; 7426 return null;
7409 7427
7410 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape 7428 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape
7411 v = rules.GetVector3Item(idx++); // cut 7429 v = rules.GetVector3Item(idx++); // cut
@@ -7418,7 +7436,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7418 7436
7419 case (int)ScriptBaseClass.PRIM_TYPE_TORUS: 7437 case (int)ScriptBaseClass.PRIM_TYPE_TORUS:
7420 if (remain < 11) 7438 if (remain < 11)
7421 return; 7439 return null;
7422 7440
7423 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape 7441 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape
7424 v = rules.GetVector3Item(idx++); //cut 7442 v = rules.GetVector3Item(idx++); //cut
@@ -7437,7 +7455,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7437 7455
7438 case (int)ScriptBaseClass.PRIM_TYPE_TUBE: 7456 case (int)ScriptBaseClass.PRIM_TYPE_TUBE:
7439 if (remain < 11) 7457 if (remain < 11)
7440 return; 7458 return null;
7441 7459
7442 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape 7460 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape
7443 v = rules.GetVector3Item(idx++); //cut 7461 v = rules.GetVector3Item(idx++); //cut
@@ -7456,7 +7474,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7456 7474
7457 case (int)ScriptBaseClass.PRIM_TYPE_RING: 7475 case (int)ScriptBaseClass.PRIM_TYPE_RING:
7458 if (remain < 11) 7476 if (remain < 11)
7459 return; 7477 return null;
7460 7478
7461 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape 7479 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape
7462 v = rules.GetVector3Item(idx++); //cut 7480 v = rules.GetVector3Item(idx++); //cut
@@ -7475,7 +7493,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7475 7493
7476 case (int)ScriptBaseClass.PRIM_TYPE_SCULPT: 7494 case (int)ScriptBaseClass.PRIM_TYPE_SCULPT:
7477 if (remain < 2) 7495 if (remain < 2)
7478 return; 7496 return null;
7479 7497
7480 string map = rules.Data[idx++].ToString(); 7498 string map = rules.Data[idx++].ToString();
7481 face = (int)rules.GetLSLIntegerItem(idx++); // type 7499 face = (int)rules.GetLSLIntegerItem(idx++); // type
@@ -7487,7 +7505,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7487 7505
7488 case (int)ScriptBaseClass.PRIM_TEXTURE: 7506 case (int)ScriptBaseClass.PRIM_TEXTURE:
7489 if (remain < 5) 7507 if (remain < 5)
7490 return; 7508 return null;
7491 7509
7492 face=(int)rules.GetLSLIntegerItem(idx++); 7510 face=(int)rules.GetLSLIntegerItem(idx++);
7493 string tex=rules.Data[idx++].ToString(); 7511 string tex=rules.Data[idx++].ToString();
@@ -7504,7 +7522,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7504 7522
7505 case (int)ScriptBaseClass.PRIM_COLOR: 7523 case (int)ScriptBaseClass.PRIM_COLOR:
7506 if (remain < 3) 7524 if (remain < 3)
7507 return; 7525 return null;
7508 7526
7509 face=(int)rules.GetLSLIntegerItem(idx++); 7527 face=(int)rules.GetLSLIntegerItem(idx++);
7510 LSL_Vector color=rules.GetVector3Item(idx++); 7528 LSL_Vector color=rules.GetVector3Item(idx++);
@@ -7517,7 +7535,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7517 7535
7518 case (int)ScriptBaseClass.PRIM_FLEXIBLE: 7536 case (int)ScriptBaseClass.PRIM_FLEXIBLE:
7519 if (remain < 7) 7537 if (remain < 7)
7520 return; 7538 return null;
7521 7539
7522 bool flexi = rules.GetLSLIntegerItem(idx++); 7540 bool flexi = rules.GetLSLIntegerItem(idx++);
7523 int softness = rules.GetLSLIntegerItem(idx++); 7541 int softness = rules.GetLSLIntegerItem(idx++);
@@ -7533,7 +7551,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7533 7551
7534 case (int)ScriptBaseClass.PRIM_POINT_LIGHT: 7552 case (int)ScriptBaseClass.PRIM_POINT_LIGHT:
7535 if (remain < 5) 7553 if (remain < 5)
7536 return; 7554 return null;
7537 bool light = rules.GetLSLIntegerItem(idx++); 7555 bool light = rules.GetLSLIntegerItem(idx++);
7538 LSL_Vector lightcolor = rules.GetVector3Item(idx++); 7556 LSL_Vector lightcolor = rules.GetVector3Item(idx++);
7539 float intensity = (float)rules.GetLSLFloatItem(idx++); 7557 float intensity = (float)rules.GetLSLFloatItem(idx++);
@@ -7546,7 +7564,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7546 7564
7547 case (int)ScriptBaseClass.PRIM_GLOW: 7565 case (int)ScriptBaseClass.PRIM_GLOW:
7548 if (remain < 2) 7566 if (remain < 2)
7549 return; 7567 return null;
7550 face = rules.GetLSLIntegerItem(idx++); 7568 face = rules.GetLSLIntegerItem(idx++);
7551 float glow = (float)rules.GetLSLFloatItem(idx++); 7569 float glow = (float)rules.GetLSLFloatItem(idx++);
7552 7570
@@ -7556,7 +7574,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7556 7574
7557 case (int)ScriptBaseClass.PRIM_BUMP_SHINY: 7575 case (int)ScriptBaseClass.PRIM_BUMP_SHINY:
7558 if (remain < 3) 7576 if (remain < 3)
7559 return; 7577 return null;
7560 face = (int)rules.GetLSLIntegerItem(idx++); 7578 face = (int)rules.GetLSLIntegerItem(idx++);
7561 int shiny = (int)rules.GetLSLIntegerItem(idx++); 7579 int shiny = (int)rules.GetLSLIntegerItem(idx++);
7562 Bumpiness bump = (Bumpiness)(int)rules.GetLSLIntegerItem(idx++); 7580 Bumpiness bump = (Bumpiness)(int)rules.GetLSLIntegerItem(idx++);
@@ -7567,7 +7585,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7567 7585
7568 case (int)ScriptBaseClass.PRIM_FULLBRIGHT: 7586 case (int)ScriptBaseClass.PRIM_FULLBRIGHT:
7569 if (remain < 2) 7587 if (remain < 2)
7570 return; 7588 return null;
7571 face = rules.GetLSLIntegerItem(idx++); 7589 face = rules.GetLSLIntegerItem(idx++);
7572 bool st = rules.GetLSLIntegerItem(idx++); 7590 bool st = rules.GetLSLIntegerItem(idx++);
7573 SetFullBright(part, face , st); 7591 SetFullBright(part, face , st);
@@ -7575,17 +7593,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7575 7593
7576 case (int)ScriptBaseClass.PRIM_MATERIAL: 7594 case (int)ScriptBaseClass.PRIM_MATERIAL:
7577 if (remain < 1) 7595 if (remain < 1)
7578 return; 7596 return null;
7579 int mat = rules.GetLSLIntegerItem(idx++); 7597 int mat = rules.GetLSLIntegerItem(idx++);
7580 if (mat < 0 || mat > 7) 7598 if (mat < 0 || mat > 7)
7581 return; 7599 return null;
7582 7600
7583 part.Material = Convert.ToByte(mat); 7601 part.Material = Convert.ToByte(mat);
7584 break; 7602 break;
7585 7603
7586 case (int)ScriptBaseClass.PRIM_PHANTOM: 7604 case (int)ScriptBaseClass.PRIM_PHANTOM:
7587 if (remain < 1) 7605 if (remain < 1)
7588 return; 7606 return null;
7589 7607
7590 string ph = rules.Data[idx++].ToString(); 7608 string ph = rules.Data[idx++].ToString();
7591 m_host.ParentGroup.ScriptSetPhantomStatus(ph.Equals("1")); 7609 m_host.ParentGroup.ScriptSetPhantomStatus(ph.Equals("1"));
@@ -7594,7 +7612,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7594 7612
7595 case (int)ScriptBaseClass.PRIM_PHYSICS: 7613 case (int)ScriptBaseClass.PRIM_PHYSICS:
7596 if (remain < 1) 7614 if (remain < 1)
7597 return; 7615 return null;
7598 string phy = rules.Data[idx++].ToString(); 7616 string phy = rules.Data[idx++].ToString();
7599 bool physics; 7617 bool physics;
7600 7618
@@ -7608,7 +7626,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7608 7626
7609 case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ: 7627 case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ:
7610 if (remain < 1) 7628 if (remain < 1)
7611 return; 7629 return null;
7612 string temp = rules.Data[idx++].ToString(); 7630 string temp = rules.Data[idx++].ToString();
7613 7631
7614 m_host.ParentGroup.ScriptSetTemporaryStatus(temp.Equals("1")); 7632 m_host.ParentGroup.ScriptSetTemporaryStatus(temp.Equals("1"));
@@ -7617,7 +7635,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7617 7635
7618 case (int)ScriptBaseClass.PRIM_TEXGEN: 7636 case (int)ScriptBaseClass.PRIM_TEXGEN:
7619 if (remain < 2) 7637 if (remain < 2)
7620 return; 7638 return null;
7621 //face,type 7639 //face,type
7622 face = rules.GetLSLIntegerItem(idx++); 7640 face = rules.GetLSLIntegerItem(idx++);
7623 int style = rules.GetLSLIntegerItem(idx++); 7641 int style = rules.GetLSLIntegerItem(idx++);
@@ -7625,7 +7643,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7625 break; 7643 break;
7626 case (int)ScriptBaseClass.PRIM_TEXT: 7644 case (int)ScriptBaseClass.PRIM_TEXT:
7627 if (remain < 3) 7645 if (remain < 3)
7628 return; 7646 return null;
7629 string primText = rules.GetLSLStringItem(idx++); 7647 string primText = rules.GetLSLStringItem(idx++);
7630 LSL_Vector primTextColor = rules.GetVector3Item(idx++); 7648 LSL_Vector primTextColor = rules.GetVector3Item(idx++);
7631 LSL_Float primTextAlpha = rules.GetLSLFloatItem(idx++); 7649 LSL_Float primTextAlpha = rules.GetLSLFloatItem(idx++);
@@ -7637,25 +7655,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7637 break; 7655 break;
7638 case (int)ScriptBaseClass.PRIM_NAME: 7656 case (int)ScriptBaseClass.PRIM_NAME:
7639 if (remain < 1) 7657 if (remain < 1)
7640 return; 7658 return null;
7641 string primName = rules.GetLSLStringItem(idx++); 7659 string primName = rules.GetLSLStringItem(idx++);
7642 part.Name = primName; 7660 part.Name = primName;
7643 break; 7661 break;
7644 case (int)ScriptBaseClass.PRIM_DESC: 7662 case (int)ScriptBaseClass.PRIM_DESC:
7645 if (remain < 1) 7663 if (remain < 1)
7646 return; 7664 return null;
7647 string primDesc = rules.GetLSLStringItem(idx++); 7665 string primDesc = rules.GetLSLStringItem(idx++);
7648 part.Description = primDesc; 7666 part.Description = primDesc;
7649 break; 7667 break;
7650 case (int)ScriptBaseClass.PRIM_ROT_LOCAL: 7668 case (int)ScriptBaseClass.PRIM_ROT_LOCAL:
7651 if (remain < 1) 7669 if (remain < 1)
7652 return; 7670 return null;
7653 LSL_Rotation lr = rules.GetQuaternionItem(idx++); 7671 LSL_Rotation lr = rules.GetQuaternionItem(idx++);
7654 SetRot(part, Rot2Quaternion(lr)); 7672 SetRot(part, Rot2Quaternion(lr));
7655 break; 7673 break;
7656 case (int)ScriptBaseClass.PRIM_OMEGA: 7674 case (int)ScriptBaseClass.PRIM_OMEGA:
7657 if (remain < 3) 7675 if (remain < 3)
7658 return; 7676 return null;
7659 LSL_Vector axis = rules.GetVector3Item(idx++); 7677 LSL_Vector axis = rules.GetVector3Item(idx++);
7660 LSL_Float spinrate = rules.GetLSLFloatItem(idx++); 7678 LSL_Float spinrate = rules.GetLSLFloatItem(idx++);
7661 LSL_Float gain = rules.GetLSLFloatItem(idx++); 7679 LSL_Float gain = rules.GetLSLFloatItem(idx++);
@@ -7663,12 +7681,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7663 break; 7681 break;
7664 case (int)ScriptBaseClass.PRIM_LINK_TARGET: 7682 case (int)ScriptBaseClass.PRIM_LINK_TARGET:
7665 if (remain < 3) // setting to 3 on the basis that parsing any usage of PRIM_LINK_TARGET that has nothing following it is pointless. 7683 if (remain < 3) // setting to 3 on the basis that parsing any usage of PRIM_LINK_TARGET that has nothing following it is pointless.
7666 return; 7684 return null;
7667 LSL_Integer new_linknumber = rules.GetLSLIntegerItem(idx++);
7668 LSL_List new_rules = rules.GetSublist(idx, -1);
7669 setLinkPrimParams((int)new_linknumber, new_rules);
7670 7685
7671 return; 7686 return rules.GetSublist(idx, -1);
7672 } 7687 }
7673 } 7688 }
7674 } 7689 }
@@ -7690,6 +7705,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7690 } 7705 }
7691 } 7706 }
7692 } 7707 }
7708 return null;
7693 } 7709 }
7694 7710
7695 public LSL_String llStringToBase64(string str) 7711 public LSL_String llStringToBase64(string str)
@@ -10762,7 +10778,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10762 if (obj.OwnerID != m_host.OwnerID) 10778 if (obj.OwnerID != m_host.OwnerID)
10763 return; 10779 return;
10764 10780
10765 SetPrimParams(obj, rules); 10781 LSL_List remaining = SetPrimParams(obj, rules);
10782
10783 while (remaining != null && remaining.Length > 2)
10784 {
10785 LSL_Integer newLink = remaining.GetLSLIntegerItem(0);
10786 LSL_List newrules = remaining.GetSublist(1, -1);
10787 foreach(SceneObjectPart part in GetLinkParts(obj, newLink)){
10788 remaining = SetPrimParams(part, newrules);
10789 }
10790 }
10766 } 10791 }
10767 10792
10768 public LSL_List GetLinkPrimitiveParamsEx(LSL_Key prim, LSL_List rules) 10793 public LSL_List GetLinkPrimitiveParamsEx(LSL_Key prim, LSL_List rules)