aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorSignpostMarv2012-08-15 21:14:39 +0100
committerJustin Clark-Casey (justincc)2012-08-24 21:49:44 +0100
commitb714fb0c391335c957d1fe9393fe154b885f7d62 (patch)
tree067a18ef45f9ca03f752775cd3362434a1b77fc3 /OpenSim
parentDon't enable the thread watchdog until all regions are ready. (diff)
downloadopensim-SC_OLD-b714fb0c391335c957d1fe9393fe154b885f7d62.zip
opensim-SC_OLD-b714fb0c391335c957d1fe9393fe154b885f7d62.tar.gz
opensim-SC_OLD-b714fb0c391335c957d1fe9393fe154b885f7d62.tar.bz2
opensim-SC_OLD-b714fb0c391335c957d1fe9393fe154b885f7d62.tar.xz
Implementing PRIM_LINK_TARGET in a non-recursive fashion
Diffstat (limited to 'OpenSim')
-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 3591d14..7a4a97c 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>();
@@ -7184,7 +7189,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7184 public void llSetPrimitiveParams(LSL_List rules) 7189 public void llSetPrimitiveParams(LSL_List rules)
7185 { 7190 {
7186 m_host.AddScriptLPS(1); 7191 m_host.AddScriptLPS(1);
7187 SetPrimParams(m_host, rules); 7192
7193 setLinkPrimParams(ScriptBaseClass.LINK_THIS, rules);
7188 7194
7189 ScriptSleep(200); 7195 ScriptSleep(200);
7190 } 7196 }
@@ -7209,11 +7215,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7209 { 7215 {
7210 List<SceneObjectPart> parts = GetLinkParts(linknumber); 7216 List<SceneObjectPart> parts = GetLinkParts(linknumber);
7211 7217
7218 LSL_List remaining = null;
7219
7212 foreach (SceneObjectPart part in parts) 7220 foreach (SceneObjectPart part in parts)
7213 SetPrimParams(part, rules); 7221 remaining = SetPrimParams(part, rules);
7222
7223 while(remaining != null && remaining.Length > 2)
7224 {
7225 linknumber = remaining.GetLSLIntegerItem(0);
7226 rules = remaining.GetSublist(1,-1);
7227 parts = GetLinkParts(linknumber);
7228
7229 foreach (SceneObjectPart part in parts)
7230 remaining = SetPrimParams(part, rules);
7231 }
7214 } 7232 }
7215 7233
7216 protected void SetPrimParams(SceneObjectPart part, LSL_List rules) 7234 protected LSL_List SetPrimParams(SceneObjectPart part, LSL_List rules)
7217 { 7235 {
7218 int idx = 0; 7236 int idx = 0;
7219 7237
@@ -7236,7 +7254,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7236 case (int)ScriptBaseClass.PRIM_POSITION: 7254 case (int)ScriptBaseClass.PRIM_POSITION:
7237 case (int)ScriptBaseClass.PRIM_POS_LOCAL: 7255 case (int)ScriptBaseClass.PRIM_POS_LOCAL:
7238 if (remain < 1) 7256 if (remain < 1)
7239 return; 7257 return null;
7240 7258
7241 v=rules.GetVector3Item(idx++); 7259 v=rules.GetVector3Item(idx++);
7242 positionChanged = true; 7260 positionChanged = true;
@@ -7245,7 +7263,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7245 break; 7263 break;
7246 case (int)ScriptBaseClass.PRIM_SIZE: 7264 case (int)ScriptBaseClass.PRIM_SIZE:
7247 if (remain < 1) 7265 if (remain < 1)
7248 return; 7266 return null;
7249 7267
7250 v=rules.GetVector3Item(idx++); 7268 v=rules.GetVector3Item(idx++);
7251 SetScale(part, v); 7269 SetScale(part, v);
@@ -7253,7 +7271,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7253 break; 7271 break;
7254 case (int)ScriptBaseClass.PRIM_ROTATION: 7272 case (int)ScriptBaseClass.PRIM_ROTATION:
7255 if (remain < 1) 7273 if (remain < 1)
7256 return; 7274 return null;
7257 7275
7258 LSL_Rotation q = rules.GetQuaternionItem(idx++); 7276 LSL_Rotation q = rules.GetQuaternionItem(idx++);
7259 // try to let this work as in SL... 7277 // try to let this work as in SL...
@@ -7273,7 +7291,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7273 7291
7274 case (int)ScriptBaseClass.PRIM_TYPE: 7292 case (int)ScriptBaseClass.PRIM_TYPE:
7275 if (remain < 3) 7293 if (remain < 3)
7276 return; 7294 return null;
7277 7295
7278 code = (int)rules.GetLSLIntegerItem(idx++); 7296 code = (int)rules.GetLSLIntegerItem(idx++);
7279 7297
@@ -7292,7 +7310,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7292 { 7310 {
7293 case (int)ScriptBaseClass.PRIM_TYPE_BOX: 7311 case (int)ScriptBaseClass.PRIM_TYPE_BOX:
7294 if (remain < 6) 7312 if (remain < 6)
7295 return; 7313 return null;
7296 7314
7297 face = (int)rules.GetLSLIntegerItem(idx++); 7315 face = (int)rules.GetLSLIntegerItem(idx++);
7298 v = rules.GetVector3Item(idx++); // cut 7316 v = rules.GetVector3Item(idx++); // cut
@@ -7307,7 +7325,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7307 7325
7308 case (int)ScriptBaseClass.PRIM_TYPE_CYLINDER: 7326 case (int)ScriptBaseClass.PRIM_TYPE_CYLINDER:
7309 if (remain < 6) 7327 if (remain < 6)
7310 return; 7328 return null;
7311 7329
7312 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape 7330 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape
7313 v = rules.GetVector3Item(idx++); // cut 7331 v = rules.GetVector3Item(idx++); // cut
@@ -7321,7 +7339,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7321 7339
7322 case (int)ScriptBaseClass.PRIM_TYPE_PRISM: 7340 case (int)ScriptBaseClass.PRIM_TYPE_PRISM:
7323 if (remain < 6) 7341 if (remain < 6)
7324 return; 7342 return null;
7325 7343
7326 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape 7344 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape
7327 v = rules.GetVector3Item(idx++); //cut 7345 v = rules.GetVector3Item(idx++); //cut
@@ -7335,7 +7353,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7335 7353
7336 case (int)ScriptBaseClass.PRIM_TYPE_SPHERE: 7354 case (int)ScriptBaseClass.PRIM_TYPE_SPHERE:
7337 if (remain < 5) 7355 if (remain < 5)
7338 return; 7356 return null;
7339 7357
7340 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape 7358 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape
7341 v = rules.GetVector3Item(idx++); // cut 7359 v = rules.GetVector3Item(idx++); // cut
@@ -7348,7 +7366,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7348 7366
7349 case (int)ScriptBaseClass.PRIM_TYPE_TORUS: 7367 case (int)ScriptBaseClass.PRIM_TYPE_TORUS:
7350 if (remain < 11) 7368 if (remain < 11)
7351 return; 7369 return null;
7352 7370
7353 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape 7371 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape
7354 v = rules.GetVector3Item(idx++); //cut 7372 v = rules.GetVector3Item(idx++); //cut
@@ -7367,7 +7385,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7367 7385
7368 case (int)ScriptBaseClass.PRIM_TYPE_TUBE: 7386 case (int)ScriptBaseClass.PRIM_TYPE_TUBE:
7369 if (remain < 11) 7387 if (remain < 11)
7370 return; 7388 return null;
7371 7389
7372 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape 7390 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape
7373 v = rules.GetVector3Item(idx++); //cut 7391 v = rules.GetVector3Item(idx++); //cut
@@ -7386,7 +7404,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7386 7404
7387 case (int)ScriptBaseClass.PRIM_TYPE_RING: 7405 case (int)ScriptBaseClass.PRIM_TYPE_RING:
7388 if (remain < 11) 7406 if (remain < 11)
7389 return; 7407 return null;
7390 7408
7391 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape 7409 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape
7392 v = rules.GetVector3Item(idx++); //cut 7410 v = rules.GetVector3Item(idx++); //cut
@@ -7405,7 +7423,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7405 7423
7406 case (int)ScriptBaseClass.PRIM_TYPE_SCULPT: 7424 case (int)ScriptBaseClass.PRIM_TYPE_SCULPT:
7407 if (remain < 2) 7425 if (remain < 2)
7408 return; 7426 return null;
7409 7427
7410 string map = rules.Data[idx++].ToString(); 7428 string map = rules.Data[idx++].ToString();
7411 face = (int)rules.GetLSLIntegerItem(idx++); // type 7429 face = (int)rules.GetLSLIntegerItem(idx++); // type
@@ -7417,7 +7435,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7417 7435
7418 case (int)ScriptBaseClass.PRIM_TEXTURE: 7436 case (int)ScriptBaseClass.PRIM_TEXTURE:
7419 if (remain < 5) 7437 if (remain < 5)
7420 return; 7438 return null;
7421 7439
7422 face=(int)rules.GetLSLIntegerItem(idx++); 7440 face=(int)rules.GetLSLIntegerItem(idx++);
7423 string tex=rules.Data[idx++].ToString(); 7441 string tex=rules.Data[idx++].ToString();
@@ -7434,7 +7452,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7434 7452
7435 case (int)ScriptBaseClass.PRIM_COLOR: 7453 case (int)ScriptBaseClass.PRIM_COLOR:
7436 if (remain < 3) 7454 if (remain < 3)
7437 return; 7455 return null;
7438 7456
7439 face=(int)rules.GetLSLIntegerItem(idx++); 7457 face=(int)rules.GetLSLIntegerItem(idx++);
7440 LSL_Vector color=rules.GetVector3Item(idx++); 7458 LSL_Vector color=rules.GetVector3Item(idx++);
@@ -7447,7 +7465,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7447 7465
7448 case (int)ScriptBaseClass.PRIM_FLEXIBLE: 7466 case (int)ScriptBaseClass.PRIM_FLEXIBLE:
7449 if (remain < 7) 7467 if (remain < 7)
7450 return; 7468 return null;
7451 7469
7452 bool flexi = rules.GetLSLIntegerItem(idx++); 7470 bool flexi = rules.GetLSLIntegerItem(idx++);
7453 int softness = rules.GetLSLIntegerItem(idx++); 7471 int softness = rules.GetLSLIntegerItem(idx++);
@@ -7463,7 +7481,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7463 7481
7464 case (int)ScriptBaseClass.PRIM_POINT_LIGHT: 7482 case (int)ScriptBaseClass.PRIM_POINT_LIGHT:
7465 if (remain < 5) 7483 if (remain < 5)
7466 return; 7484 return null;
7467 bool light = rules.GetLSLIntegerItem(idx++); 7485 bool light = rules.GetLSLIntegerItem(idx++);
7468 LSL_Vector lightcolor = rules.GetVector3Item(idx++); 7486 LSL_Vector lightcolor = rules.GetVector3Item(idx++);
7469 float intensity = (float)rules.GetLSLFloatItem(idx++); 7487 float intensity = (float)rules.GetLSLFloatItem(idx++);
@@ -7476,7 +7494,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7476 7494
7477 case (int)ScriptBaseClass.PRIM_GLOW: 7495 case (int)ScriptBaseClass.PRIM_GLOW:
7478 if (remain < 2) 7496 if (remain < 2)
7479 return; 7497 return null;
7480 face = rules.GetLSLIntegerItem(idx++); 7498 face = rules.GetLSLIntegerItem(idx++);
7481 float glow = (float)rules.GetLSLFloatItem(idx++); 7499 float glow = (float)rules.GetLSLFloatItem(idx++);
7482 7500
@@ -7486,7 +7504,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7486 7504
7487 case (int)ScriptBaseClass.PRIM_BUMP_SHINY: 7505 case (int)ScriptBaseClass.PRIM_BUMP_SHINY:
7488 if (remain < 3) 7506 if (remain < 3)
7489 return; 7507 return null;
7490 face = (int)rules.GetLSLIntegerItem(idx++); 7508 face = (int)rules.GetLSLIntegerItem(idx++);
7491 int shiny = (int)rules.GetLSLIntegerItem(idx++); 7509 int shiny = (int)rules.GetLSLIntegerItem(idx++);
7492 Bumpiness bump = (Bumpiness)(int)rules.GetLSLIntegerItem(idx++); 7510 Bumpiness bump = (Bumpiness)(int)rules.GetLSLIntegerItem(idx++);
@@ -7497,7 +7515,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7497 7515
7498 case (int)ScriptBaseClass.PRIM_FULLBRIGHT: 7516 case (int)ScriptBaseClass.PRIM_FULLBRIGHT:
7499 if (remain < 2) 7517 if (remain < 2)
7500 return; 7518 return null;
7501 face = rules.GetLSLIntegerItem(idx++); 7519 face = rules.GetLSLIntegerItem(idx++);
7502 bool st = rules.GetLSLIntegerItem(idx++); 7520 bool st = rules.GetLSLIntegerItem(idx++);
7503 SetFullBright(part, face , st); 7521 SetFullBright(part, face , st);
@@ -7505,17 +7523,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7505 7523
7506 case (int)ScriptBaseClass.PRIM_MATERIAL: 7524 case (int)ScriptBaseClass.PRIM_MATERIAL:
7507 if (remain < 1) 7525 if (remain < 1)
7508 return; 7526 return null;
7509 int mat = rules.GetLSLIntegerItem(idx++); 7527 int mat = rules.GetLSLIntegerItem(idx++);
7510 if (mat < 0 || mat > 7) 7528 if (mat < 0 || mat > 7)
7511 return; 7529 return null;
7512 7530
7513 part.Material = Convert.ToByte(mat); 7531 part.Material = Convert.ToByte(mat);
7514 break; 7532 break;
7515 7533
7516 case (int)ScriptBaseClass.PRIM_PHANTOM: 7534 case (int)ScriptBaseClass.PRIM_PHANTOM:
7517 if (remain < 1) 7535 if (remain < 1)
7518 return; 7536 return null;
7519 7537
7520 string ph = rules.Data[idx++].ToString(); 7538 string ph = rules.Data[idx++].ToString();
7521 m_host.ParentGroup.ScriptSetPhantomStatus(ph.Equals("1")); 7539 m_host.ParentGroup.ScriptSetPhantomStatus(ph.Equals("1"));
@@ -7524,7 +7542,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7524 7542
7525 case (int)ScriptBaseClass.PRIM_PHYSICS: 7543 case (int)ScriptBaseClass.PRIM_PHYSICS:
7526 if (remain < 1) 7544 if (remain < 1)
7527 return; 7545 return null;
7528 string phy = rules.Data[idx++].ToString(); 7546 string phy = rules.Data[idx++].ToString();
7529 bool physics; 7547 bool physics;
7530 7548
@@ -7538,7 +7556,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7538 7556
7539 case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ: 7557 case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ:
7540 if (remain < 1) 7558 if (remain < 1)
7541 return; 7559 return null;
7542 string temp = rules.Data[idx++].ToString(); 7560 string temp = rules.Data[idx++].ToString();
7543 7561
7544 m_host.ParentGroup.ScriptSetTemporaryStatus(temp.Equals("1")); 7562 m_host.ParentGroup.ScriptSetTemporaryStatus(temp.Equals("1"));
@@ -7547,7 +7565,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7547 7565
7548 case (int)ScriptBaseClass.PRIM_TEXGEN: 7566 case (int)ScriptBaseClass.PRIM_TEXGEN:
7549 if (remain < 2) 7567 if (remain < 2)
7550 return; 7568 return null;
7551 //face,type 7569 //face,type
7552 face = rules.GetLSLIntegerItem(idx++); 7570 face = rules.GetLSLIntegerItem(idx++);
7553 int style = rules.GetLSLIntegerItem(idx++); 7571 int style = rules.GetLSLIntegerItem(idx++);
@@ -7555,7 +7573,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7555 break; 7573 break;
7556 case (int)ScriptBaseClass.PRIM_TEXT: 7574 case (int)ScriptBaseClass.PRIM_TEXT:
7557 if (remain < 3) 7575 if (remain < 3)
7558 return; 7576 return null;
7559 string primText = rules.GetLSLStringItem(idx++); 7577 string primText = rules.GetLSLStringItem(idx++);
7560 LSL_Vector primTextColor = rules.GetVector3Item(idx++); 7578 LSL_Vector primTextColor = rules.GetVector3Item(idx++);
7561 LSL_Float primTextAlpha = rules.GetLSLFloatItem(idx++); 7579 LSL_Float primTextAlpha = rules.GetLSLFloatItem(idx++);
@@ -7567,25 +7585,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7567 break; 7585 break;
7568 case (int)ScriptBaseClass.PRIM_NAME: 7586 case (int)ScriptBaseClass.PRIM_NAME:
7569 if (remain < 1) 7587 if (remain < 1)
7570 return; 7588 return null;
7571 string primName = rules.GetLSLStringItem(idx++); 7589 string primName = rules.GetLSLStringItem(idx++);
7572 part.Name = primName; 7590 part.Name = primName;
7573 break; 7591 break;
7574 case (int)ScriptBaseClass.PRIM_DESC: 7592 case (int)ScriptBaseClass.PRIM_DESC:
7575 if (remain < 1) 7593 if (remain < 1)
7576 return; 7594 return null;
7577 string primDesc = rules.GetLSLStringItem(idx++); 7595 string primDesc = rules.GetLSLStringItem(idx++);
7578 part.Description = primDesc; 7596 part.Description = primDesc;
7579 break; 7597 break;
7580 case (int)ScriptBaseClass.PRIM_ROT_LOCAL: 7598 case (int)ScriptBaseClass.PRIM_ROT_LOCAL:
7581 if (remain < 1) 7599 if (remain < 1)
7582 return; 7600 return null;
7583 LSL_Rotation lr = rules.GetQuaternionItem(idx++); 7601 LSL_Rotation lr = rules.GetQuaternionItem(idx++);
7584 SetRot(part, Rot2Quaternion(lr)); 7602 SetRot(part, Rot2Quaternion(lr));
7585 break; 7603 break;
7586 case (int)ScriptBaseClass.PRIM_OMEGA: 7604 case (int)ScriptBaseClass.PRIM_OMEGA:
7587 if (remain < 3) 7605 if (remain < 3)
7588 return; 7606 return null;
7589 LSL_Vector axis = rules.GetVector3Item(idx++); 7607 LSL_Vector axis = rules.GetVector3Item(idx++);
7590 LSL_Float spinrate = rules.GetLSLFloatItem(idx++); 7608 LSL_Float spinrate = rules.GetLSLFloatItem(idx++);
7591 LSL_Float gain = rules.GetLSLFloatItem(idx++); 7609 LSL_Float gain = rules.GetLSLFloatItem(idx++);
@@ -7593,12 +7611,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7593 break; 7611 break;
7594 case (int)ScriptBaseClass.PRIM_LINK_TARGET: 7612 case (int)ScriptBaseClass.PRIM_LINK_TARGET:
7595 if (remain < 3) // setting to 3 on the basis that parsing any usage of PRIM_LINK_TARGET that has nothing following it is pointless. 7613 if (remain < 3) // setting to 3 on the basis that parsing any usage of PRIM_LINK_TARGET that has nothing following it is pointless.
7596 return; 7614 return null;
7597 LSL_Integer new_linknumber = rules.GetLSLIntegerItem(idx++);
7598 LSL_List new_rules = rules.GetSublist(idx, -1);
7599 setLinkPrimParams((int)new_linknumber, new_rules);
7600 7615
7601 return; 7616 return rules.GetSublist(idx, -1);
7602 } 7617 }
7603 } 7618 }
7604 } 7619 }
@@ -7620,6 +7635,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7620 } 7635 }
7621 } 7636 }
7622 } 7637 }
7638 return null;
7623 } 7639 }
7624 7640
7625 public LSL_String llStringToBase64(string str) 7641 public LSL_String llStringToBase64(string str)
@@ -10692,7 +10708,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10692 if (obj.OwnerID != m_host.OwnerID) 10708 if (obj.OwnerID != m_host.OwnerID)
10693 return; 10709 return;
10694 10710
10695 SetPrimParams(obj, rules); 10711 LSL_List remaining = SetPrimParams(obj, rules);
10712
10713 while (remaining != null && remaining.Length > 2)
10714 {
10715 LSL_Integer newLink = remaining.GetLSLIntegerItem(0);
10716 LSL_List newrules = remaining.GetSublist(1, -1);
10717 foreach(SceneObjectPart part in GetLinkParts(obj, newLink)){
10718 remaining = SetPrimParams(part, newrules);
10719 }
10720 }
10696 } 10721 }
10697 10722
10698 public LSL_List GetLinkPrimitiveParamsEx(LSL_Key prim, LSL_List rules) 10723 public LSL_List GetLinkPrimitiveParamsEx(LSL_Key prim, LSL_List rules)