aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorBlueWall2013-01-23 08:16:18 -0500
committerBlueWall2013-01-23 08:16:18 -0500
commit2841ed05cf003fef8dc820d0327c1fcce0d76e93 (patch)
tree2d3647e4ffad8220e5b30fbdfbf7b3a36be0597c /OpenSim/Region/ScriptEngine/Shared/Api
parentAdd additional return status (diff)
parentBulletSim: Tweeks to vehicle motion. (diff)
downloadopensim-SC-2841ed05cf003fef8dc820d0327c1fcce0d76e93.zip
opensim-SC-2841ed05cf003fef8dc820d0327c1fcce0d76e93.tar.gz
opensim-SC-2841ed05cf003fef8dc820d0327c1fcce0d76e93.tar.bz2
opensim-SC-2841ed05cf003fef8dc820d0327c1fcce0d76e93.tar.xz
Merge branch 'master' of /home/opensim/var/repo/opensim
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs83
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs17
3 files changed, 97 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index d47fd6b..507c399 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3364,7 +3364,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3364 if (animID == UUID.Zero) 3364 if (animID == UUID.Zero)
3365 presence.Animator.RemoveAnimation(anim); 3365 presence.Animator.RemoveAnimation(anim);
3366 else 3366 else
3367 presence.Animator.RemoveAnimation(animID); 3367 presence.Animator.RemoveAnimation(animID, true);
3368 } 3368 }
3369 } 3369 }
3370 } 3370 }
@@ -4923,7 +4923,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4923 public LSL_Vector llGetCenterOfMass() 4923 public LSL_Vector llGetCenterOfMass()
4924 { 4924 {
4925 m_host.AddScriptLPS(1); 4925 m_host.AddScriptLPS(1);
4926 Vector3 center = m_host.GetGeometricCenter(); 4926 Vector3 center = m_host.GetCenterOfMass();
4927 return new LSL_Vector(center.X,center.Y,center.Z); 4927 return new LSL_Vector(center.X,center.Y,center.Z);
4928 } 4928 }
4929 4929
@@ -5793,13 +5793,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5793 if (parcelOwned && land.LandData.OwnerID == id || 5793 if (parcelOwned && land.LandData.OwnerID == id ||
5794 parcel && land.LandData.GlobalID == id) 5794 parcel && land.LandData.GlobalID == id)
5795 { 5795 {
5796 result.Add(ssp.UUID.ToString()); 5796 result.Add(new LSL_Key(ssp.UUID.ToString()));
5797 } 5797 }
5798 } 5798 }
5799 } 5799 }
5800 else 5800 else
5801 { 5801 {
5802 result.Add(ssp.UUID.ToString()); 5802 result.Add(new LSL_Key(ssp.UUID.ToString()));
5803 } 5803 }
5804 } 5804 }
5805 // Maximum of 100 results 5805 // Maximum of 100 results
@@ -10590,6 +10590,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10590 case ScriptBaseClass.OBJECT_PHYSICS_COST: 10590 case ScriptBaseClass.OBJECT_PHYSICS_COST:
10591 ret.Add(new LSL_Float(0)); 10591 ret.Add(new LSL_Float(0));
10592 break; 10592 break;
10593 case ScriptBaseClass.OBJECT_CHARACTER_TIME: // Pathfinding
10594 ret.Add(new LSL_Float(0));
10595 break;
10596 case ScriptBaseClass.OBJECT_ROOT:
10597 SceneObjectPart p = av.ParentPart;
10598 if (p != null)
10599 {
10600 ret.Add(new LSL_String(p.ParentGroup.RootPart.UUID.ToString()));
10601 }
10602 else
10603 {
10604 ret.Add(new LSL_String(id));
10605 }
10606 break;
10607 case ScriptBaseClass.OBJECT_ATTACHED_POINT:
10608 ret.Add(new LSL_Integer(0));
10609 break;
10610 case ScriptBaseClass.OBJECT_PATHFINDING_TYPE: // Pathfinding
10611 ret.Add(new LSL_Integer(ScriptBaseClass.OPT_AVATAR));
10612 break;
10613 case ScriptBaseClass.OBJECT_PHYSICS:
10614 ret.Add(new LSL_Integer(0));
10615 break;
10616 case ScriptBaseClass.OBJECT_PHANTOM:
10617 ret.Add(new LSL_Integer(0));
10618 break;
10619 case ScriptBaseClass.OBJECT_TEMP_ON_REZ:
10620 ret.Add(new LSL_Integer(0));
10621 break;
10593 default: 10622 default:
10594 // Invalid or unhandled constant. 10623 // Invalid or unhandled constant.
10595 ret.Add(new LSL_Integer(ScriptBaseClass.OBJECT_UNKNOWN_DETAIL)); 10624 ret.Add(new LSL_Integer(ScriptBaseClass.OBJECT_UNKNOWN_DETAIL));
@@ -10685,6 +10714,52 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10685 // The value returned in SL for normal prims looks like the prim count 10714 // The value returned in SL for normal prims looks like the prim count
10686 ret.Add(new LSL_Float(0)); 10715 ret.Add(new LSL_Float(0));
10687 break; 10716 break;
10717 case ScriptBaseClass.OBJECT_CHARACTER_TIME: // Pathfinding
10718 ret.Add(new LSL_Float(0));
10719 break;
10720 case ScriptBaseClass.OBJECT_ROOT:
10721 ret.Add(new LSL_String(obj.ParentGroup.RootPart.UUID.ToString()));
10722 break;
10723 case ScriptBaseClass.OBJECT_ATTACHED_POINT:
10724 ret.Add(new LSL_Integer(obj.ParentGroup.AttachmentPoint));
10725 break;
10726 case ScriptBaseClass.OBJECT_PATHFINDING_TYPE:
10727 byte pcode = obj.Shape.PCode;
10728 if (obj.ParentGroup.AttachmentPoint != 0
10729 || pcode == (byte)PCode.Grass
10730 || pcode == (byte)PCode.Tree
10731 || pcode == (byte)PCode.NewTree)
10732 {
10733 ret.Add(new LSL_Integer(ScriptBaseClass.OPT_OTHER));
10734 }
10735 else
10736 {
10737 ret.Add(new LSL_Integer(ScriptBaseClass.OPT_LEGACY_LINKSET));
10738 }
10739 break;
10740 case ScriptBaseClass.OBJECT_PHYSICS:
10741 if (obj.ParentGroup.AttachmentPoint != 0)
10742 {
10743 ret.Add(new LSL_Integer(0)); // Always false if attached
10744 }
10745 else
10746 {
10747 ret.Add(new LSL_Integer(obj.ParentGroup.UsesPhysics ? 1 : 0));
10748 }
10749 break;
10750 case ScriptBaseClass.OBJECT_PHANTOM:
10751 if (obj.ParentGroup.AttachmentPoint != 0)
10752 {
10753 ret.Add(new LSL_Integer(0)); // Always false if attached
10754 }
10755 else
10756 {
10757 ret.Add(new LSL_Integer(obj.ParentGroup.IsPhantom ? 1 : 0));
10758 }
10759 break;
10760 case ScriptBaseClass.OBJECT_TEMP_ON_REZ:
10761 ret.Add(new LSL_Integer(obj.ParentGroup.IsTemporary ? 1 : 0));
10762 break;
10688 default: 10763 default:
10689 // Invalid or unhandled constant. 10764 // Invalid or unhandled constant.
10690 ret.Add(new LSL_Integer(ScriptBaseClass.OBJECT_UNKNOWN_DETAIL)); 10765 ret.Add(new LSL_Integer(ScriptBaseClass.OBJECT_UNKNOWN_DETAIL));
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 25635ff..5c0ff1c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -986,7 +986,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
986 if (animID == UUID.Zero) 986 if (animID == UUID.Zero)
987 target.Animator.RemoveAnimation(animation); 987 target.Animator.RemoveAnimation(animation);
988 else 988 else
989 target.Animator.RemoveAnimation(animID); 989 target.Animator.RemoveAnimation(animID, true);
990 } 990 }
991 } 991 }
992 } 992 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index 880841b..9bf1a64 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -556,6 +556,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
556 public const int OBJECT_SERVER_COST = 14; 556 public const int OBJECT_SERVER_COST = 14;
557 public const int OBJECT_STREAMING_COST = 15; 557 public const int OBJECT_STREAMING_COST = 15;
558 public const int OBJECT_PHYSICS_COST = 16; 558 public const int OBJECT_PHYSICS_COST = 16;
559 public const int OBJECT_CHARACTER_TIME = 17;
560 public const int OBJECT_ROOT = 18;
561 public const int OBJECT_ATTACHED_POINT = 19;
562 public const int OBJECT_PATHFINDING_TYPE = 20;
563 public const int OBJECT_PHYSICS = 21;
564 public const int OBJECT_PHANTOM = 22;
565 public const int OBJECT_TEMP_ON_REZ = 23;
566
567 // Pathfinding types
568 public const int OPT_OTHER = -1;
569 public const int OPT_LEGACY_LINKSET = 0;
570 public const int OPT_AVATAR = 1;
571 public const int OPT_CHARACTER = 2;
572 public const int OPT_WALKABLE = 3;
573 public const int OPT_STATIC_OBSTACLE = 4;
574 public const int OPT_MATERIAL_VOLUME = 5;
575 public const int OPT_EXCLUSION_VOLUME = 6;
559 576
560 // for llGetAgentList 577 // for llGetAgentList
561 public const int AGENT_LIST_PARCEL = 1; 578 public const int AGENT_LIST_PARCEL = 1;