aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorUbitUmarov2016-11-05 16:50:41 +0000
committerUbitUmarov2016-11-05 16:50:41 +0000
commit060350832ae0be015182a3516a718dfdf030b56c (patch)
tree90b5fc6f7949258ae7fedb2390b29ece3d222f96 /OpenSim/Region/ScriptEngine
parentadd a few lsl constants and move some around (diff)
downloadopensim-SC_OLD-060350832ae0be015182a3516a718dfdf030b56c.zip
opensim-SC_OLD-060350832ae0be015182a3516a718dfdf030b56c.tar.gz
opensim-SC_OLD-060350832ae0be015182a3516a718dfdf030b56c.tar.bz2
opensim-SC_OLD-060350832ae0be015182a3516a718dfdf030b56c.tar.xz
add suport for PRIM_SIT_TARGET on get(link)PrimitveParameters and fix typos
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs27
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs9
2 files changed, 24 insertions, 12 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index ced81ad..91b49cd 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -662,15 +662,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
662 List<SceneObjectPart> ret = new List<SceneObjectPart>(); 662 List<SceneObjectPart> ret = new List<SceneObjectPart>();
663 if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) 663 if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
664 return ret; 664 return ret;
665 ret.Add(part);
666 665
667 switch (linkType) 666 switch (linkType)
668 { 667 {
669 case ScriptBaseClass.LINK_SET: 668 case ScriptBaseClass.LINK_SET:
670 return new List<SceneObjectPart>(part.ParentGroup.Parts); 669 return new List<SceneObjectPart>(part.ParentGroup.Parts);
671 670
672 case ScriptBaseClass.LINK_ROOT: 671 case ScriptBaseClass.LINK_ROOT:
673 ret = new List<SceneObjectPart>();
674 ret.Add(part.ParentGroup.RootPart); 672 ret.Add(part.ParentGroup.RootPart);
675 return ret; 673 return ret;
676 674
@@ -690,16 +688,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
690 return ret; 688 return ret;
691 689
692 case ScriptBaseClass.LINK_THIS: 690 case ScriptBaseClass.LINK_THIS:
691 ret.Add(part);
693 return ret; 692 return ret;
694 693
695 default: 694 default:
696 if (linkType < 0) 695 if (linkType < 0)
697 return new List<SceneObjectPart>(); 696 return ret;
698 697
699 SceneObjectPart target = part.ParentGroup.GetLinkNumPart(linkType); 698 SceneObjectPart target = part.ParentGroup.GetLinkNumPart(linkType);
700 if (target == null) 699 if (target == null)
701 return new List<SceneObjectPart>(); 700 return ret;
702 ret = new List<SceneObjectPart>();
703 ret.Add(target); 701 ret.Add(target);
704 return ret; 702 return ret;
705 } 703 }
@@ -11182,7 +11180,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11182 res.Add(new LSL_Float(spin)); 11180 res.Add(new LSL_Float(spin));
11183 res.Add(new LSL_Float(gain)); 11181 res.Add(new LSL_Float(gain));
11184 break; 11182 break;
11185 11183
11184 case (int)ScriptBaseClass.PRIM_SIT_TARGET:
11185 if(part.IsSitTargetSet)
11186 {
11187 res.Add(new LSL_Integer(1));
11188 res.Add(new LSL_Vector(part.SitTargetPosition));
11189 res.Add(new LSL_Rotation(part.SitTargetOrientation));
11190 }
11191 else
11192 {
11193 res.Add(new LSL_Integer(0));
11194 res.Add(new LSL_Vector(Vector3.Zero));
11195 res.Add(new LSL_Rotation(Quaternion.Identity));
11196 }
11197 break;
11198
11186 case (int)ScriptBaseClass.PRIM_LINK_TARGET: 11199 case (int)ScriptBaseClass.PRIM_LINK_TARGET:
11187 11200
11188 // TODO: Should be issuing a runtime script warning in this case. 11201 // TODO: Should be issuing a runtime script warning in this case.
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index 1a3de1e..bc4d20c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -339,7 +339,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
339 339
340 // LINK flags 340 // LINK flags
341 public const int LINK_SET = -1; 341 public const int LINK_SET = -1;
342 public const int LINK_TRUEROOT = 0; // possible this should had been ROOT all the time
343 public const int LINK_ROOT = 1; 342 public const int LINK_ROOT = 1;
344 public const int LINK_ALL_OTHERS = -2; 343 public const int LINK_ALL_OTHERS = -2;
345 public const int LINK_ALL_CHILDREN = -3; 344 public const int LINK_ALL_CHILDREN = -3;
@@ -418,7 +417,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
418 public const int PRIM_DESC = 28; 417 public const int PRIM_DESC = 28;
419 public const int PRIM_ROT_LOCAL = 29; 418 public const int PRIM_ROT_LOCAL = 29;
420 public const int PRIM_PHYSICS_SHAPE_TYPE = 30; 419 public const int PRIM_PHYSICS_SHAPE_TYPE = 30;
421 public const int PRIM_PHYSICS_MATERIAL = 31; // aparently not SL 420 public const int PRIM_PHYSICS_MATERIAL = 31; // apparently not on SL wiki
422 public const int PRIM_OMEGA = 32; 421 public const int PRIM_OMEGA = 32;
423 public const int PRIM_POS_LOCAL = 33; 422 public const int PRIM_POS_LOCAL = 33;
424 public const int PRIM_LINK_TARGET = 34; 423 public const int PRIM_LINK_TARGET = 34;
@@ -426,9 +425,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
426 public const int PRIM_SPECULAR = 36; 425 public const int PRIM_SPECULAR = 36;
427 public const int PRIM_NORMAL = 37; 426 public const int PRIM_NORMAL = 37;
428 public const int PRIM_ALPHA_MODE = 38; 427 public const int PRIM_ALPHA_MODE = 38;
429 public const int PRIM_ALLOW_UNSIT = 39; // experiences related. Unsuport 428 public const int PRIM_ALLOW_UNSIT = 39; // experiences related. unsupported
430 public const int PRIM_SCRIPTED_SIT_ONLY = 40; // experiences related. Unsuport 429 public const int PRIM_SCRIPTED_SIT_ONLY = 40; // experiences related. unsupported
431 public const int PRIM_SIT_TARGET = 40; 430 public const int PRIM_SIT_TARGET = 41;
432 431
433 432
434 // parameters 433 // parameters