aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs140
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs5
4 files changed, 91 insertions, 59 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index c84afee..81f1f38 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -843,6 +843,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
843 wComm.DeliverMessage(ChatTypeEnum.Region, channelID, m_host.Name, m_host.UUID, text); 843 wComm.DeliverMessage(ChatTypeEnum.Region, channelID, m_host.Name, m_host.UUID, text);
844 } 844 }
845 845
846 public void llRegionSayTo(string target, int channel, string msg)
847 {
848 string error = String.Empty;
849
850 if (msg.Length > 1023)
851 msg = msg.Substring(0, 1023);
852
853 m_host.AddScriptLPS(1);
854
855 UUID TargetID;
856 UUID.TryParse(target, out TargetID);
857
858 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
859 if (wComm != null)
860 if (!wComm.DeliverMessageTo(TargetID, channel, m_host.AbsolutePosition, m_host.Name, m_host.UUID, msg, out error))
861 LSLError(error);
862 }
863
846 public LSL_Integer llListen(int channelID, string name, string ID, string msg) 864 public LSL_Integer llListen(int channelID, string name, string ID, string msg)
847 { 865 {
848 m_host.AddScriptLPS(1); 866 m_host.AddScriptLPS(1);
@@ -1601,9 +1619,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1601 tex.FaceTextures[i].RGBA = texcolor; 1619 tex.FaceTextures[i].RGBA = texcolor;
1602 } 1620 }
1603 } 1621 }
1604 texcolor = tex.DefaultTexture.RGBA; 1622
1605 texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f); 1623 // In some cases, the default texture can be null, eg when every face
1606 tex.DefaultTexture.RGBA = texcolor; 1624 // has a unique texture
1625 if (tex.DefaultTexture != null)
1626 {
1627 texcolor = tex.DefaultTexture.RGBA;
1628 texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f);
1629 tex.DefaultTexture.RGBA = texcolor;
1630 }
1631
1607 part.UpdateTexture(tex); 1632 part.UpdateTexture(tex);
1608 return; 1633 return;
1609 } 1634 }
@@ -2074,7 +2099,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2074 { 2099 {
2075 if (part.ParentGroup.RootPart.AttachmentPoint != 0) 2100 if (part.ParentGroup.RootPart.AttachmentPoint != 0)
2076 { 2101 {
2077 ScenePresence avatar = World.GetScenePresence(part.AttachedAvatar); 2102 ScenePresence avatar = World.GetScenePresence(part.ParentGroup.AttachedAvatar);
2078 if (avatar != null) 2103 if (avatar != null)
2079 { 2104 {
2080 if ((avatar.AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0) 2105 if ((avatar.AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0)
@@ -2218,7 +2243,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2218 2243
2219 if (m_host.IsAttachment) 2244 if (m_host.IsAttachment)
2220 { 2245 {
2221 ScenePresence avatar = m_host.ParentGroup.Scene.GetScenePresence(m_host.AttachedAvatar); 2246 ScenePresence avatar = m_host.ParentGroup.Scene.GetScenePresence(m_host.ParentGroup.AttachedAvatar);
2222 vel = avatar.Velocity; 2247 vel = avatar.Velocity;
2223 } 2248 }
2224 else 2249 else
@@ -2939,8 +2964,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2939 { 2964 {
2940 m_host.AddScriptLPS(1); 2965 m_host.AddScriptLPS(1);
2941 2966
2942 if (m_host.ParentGroup.RootPart.AttachmentPoint == 0) 2967// if (m_host.ParentGroup.RootPart.AttachmentPoint == 0)
2943 return; 2968// return;
2944 2969
2945 TaskInventoryItem item; 2970 TaskInventoryItem item;
2946 2971
@@ -3006,7 +3031,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3006 3031
3007 IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule; 3032 IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule;
3008 if (attachmentsModule != null) 3033 if (attachmentsModule != null)
3009 attachmentsModule.ShowDetachInUserInventory(itemID, presence.ControllingClient); 3034 attachmentsModule.DetachSingleAttachmentToInv(itemID, presence.ControllingClient);
3010 } 3035 }
3011 3036
3012 public void llTakeCamera(string avatar) 3037 public void llTakeCamera(string avatar)
@@ -3363,7 +3388,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3363 3388
3364 m_host.AddScriptLPS(1); 3389 m_host.AddScriptLPS(1);
3365 3390
3366 if (m_host.ParentGroup.IsAttachment && (UUID)agent == m_host.ParentGroup.RootPart.AttachedAvatar) 3391 if (m_host.ParentGroup.IsAttachment && (UUID)agent == m_host.ParentGroup.AttachedAvatar)
3367 { 3392 {
3368 // When attached, certain permissions are implicit if requested from owner 3393 // When attached, certain permissions are implicit if requested from owner
3369 int implicitPerms = ScriptBaseClass.PERMISSION_TAKE_CONTROLS | 3394 int implicitPerms = ScriptBaseClass.PERMISSION_TAKE_CONTROLS |
@@ -3909,7 +3934,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3909 GridInstantMessage msg = new GridInstantMessage(World, 3934 GridInstantMessage msg = new GridInstantMessage(World,
3910 m_host.UUID, m_host.Name+", an object owned by "+ 3935 m_host.UUID, m_host.Name+", an object owned by "+
3911 resolveName(m_host.OwnerID)+",", destId, 3936 resolveName(m_host.OwnerID)+",", destId,
3912 (byte)InstantMessageDialog.InventoryOffered, 3937 (byte)InstantMessageDialog.TaskInventoryOffered,
3913 false, objName+"\n"+m_host.Name+" is located at "+ 3938 false, objName+"\n"+m_host.Name+" is located at "+
3914 World.RegionInfo.RegionName+" "+ 3939 World.RegionInfo.RegionName+" "+
3915 m_host.AbsolutePosition.ToString(), 3940 m_host.AbsolutePosition.ToString(),
@@ -6583,7 +6608,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6583 return Util.SHA1Hash(src).ToLower(); 6608 return Util.SHA1Hash(src).ToLower();
6584 } 6609 }
6585 6610
6586 protected ObjectShapePacket.ObjectDataBlock SetPrimitiveBlockShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist) 6611 protected ObjectShapePacket.ObjectDataBlock SetPrimitiveBlockShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, byte profileshape, byte pathcurve)
6587 { 6612 {
6588 ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); 6613 ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock();
6589 6614
@@ -6594,7 +6619,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6594 { 6619 {
6595 holeshape = (int)ScriptBaseClass.PRIM_HOLE_DEFAULT; 6620 holeshape = (int)ScriptBaseClass.PRIM_HOLE_DEFAULT;
6596 } 6621 }
6597 shapeBlock.ProfileCurve = (byte)holeshape; 6622 shapeBlock.PathCurve = pathcurve;
6623 shapeBlock.ProfileCurve = (byte)holeshape; // Set the hole shape.
6624 shapeBlock.ProfileCurve += profileshape; // Add in the profile shape.
6598 if (cut.x < 0f) 6625 if (cut.x < 0f)
6599 { 6626 {
6600 cut.x = 0f; 6627 cut.x = 0f;
@@ -6626,9 +6653,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6626 { 6653 {
6627 hollow = 0f; 6654 hollow = 0f;
6628 } 6655 }
6629 if (hollow > 0.95) 6656 // If the prim is a Cylinder, Prism, Sphere, Torus or Ring (or not a
6657 // Box or Tube) and the hole shape is a square, hollow is limited to
6658 // a max of 70%. The viewer performs its own check on this value but
6659 // we need to do it here also so llGetPrimitiveParams can have access
6660 // to the correct value.
6661 if (profileshape != (byte)ProfileCurve.Square &&
6662 holeshape == (int)ScriptBaseClass.PRIM_HOLE_SQUARE)
6630 { 6663 {
6631 hollow = 0.95f; 6664 if (hollow > 0.70f)
6665 {
6666 hollow = 0.70f;
6667 }
6668 }
6669 // Otherwise, hollow is limited to 95%.
6670 else
6671 {
6672 if (hollow > 0.95f)
6673 {
6674 hollow = 0.95f;
6675 }
6632 } 6676 }
6633 shapeBlock.ProfileHollow = (ushort)(50000 * hollow); 6677 shapeBlock.ProfileHollow = (ushort)(50000 * hollow);
6634 if (twist.x < -1.0f) 6678 if (twist.x < -1.0f)
@@ -6652,20 +6696,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6652 6696
6653 shapeBlock.ObjectLocalID = part.LocalId; 6697 shapeBlock.ObjectLocalID = part.LocalId;
6654 6698
6655 // retain pathcurve
6656 shapeBlock.PathCurve = part.Shape.PathCurve;
6657
6658 part.Shape.SculptEntry = false; 6699 part.Shape.SculptEntry = false;
6659 return shapeBlock; 6700 return shapeBlock;
6660 } 6701 }
6661 6702
6662 protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector taper_b, LSL_Vector topshear, byte fudge) 6703 // Prim type box, cylinder and prism.
6704 protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector taper_b, LSL_Vector topshear, byte profileshape, byte pathcurve)
6663 { 6705 {
6664 ObjectShapePacket.ObjectDataBlock shapeBlock; 6706 ObjectShapePacket.ObjectDataBlock shapeBlock;
6665 6707
6666 shapeBlock = SetPrimitiveBlockShapeParams(part, holeshape, cut, hollow, twist); 6708 shapeBlock = SetPrimitiveBlockShapeParams(part, holeshape, cut, hollow, twist, profileshape, pathcurve);
6667
6668 shapeBlock.ProfileCurve += fudge;
6669 6709
6670 if (taper_b.x < 0f) 6710 if (taper_b.x < 0f)
6671 { 6711 {
@@ -6708,18 +6748,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6708 part.UpdateShape(shapeBlock); 6748 part.UpdateShape(shapeBlock);
6709 } 6749 }
6710 6750
6711 protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector dimple, byte fudge) 6751 // Prim type sphere.
6752 protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector dimple, byte profileshape, byte pathcurve)
6712 { 6753 {
6713 ObjectShapePacket.ObjectDataBlock shapeBlock; 6754 ObjectShapePacket.ObjectDataBlock shapeBlock;
6714 6755
6715 shapeBlock = SetPrimitiveBlockShapeParams(part, holeshape, cut, hollow, twist); 6756 shapeBlock = SetPrimitiveBlockShapeParams(part, holeshape, cut, hollow, twist, profileshape, pathcurve);
6716 6757
6717 // profile/path swapped for a sphere 6758 // profile/path swapped for a sphere
6718 shapeBlock.PathBegin = shapeBlock.ProfileBegin; 6759 shapeBlock.PathBegin = shapeBlock.ProfileBegin;
6719 shapeBlock.PathEnd = shapeBlock.ProfileEnd; 6760 shapeBlock.PathEnd = shapeBlock.ProfileEnd;
6720 6761
6721 shapeBlock.ProfileCurve += fudge;
6722
6723 shapeBlock.PathScaleX = 100; 6762 shapeBlock.PathScaleX = 100;
6724 shapeBlock.PathScaleY = 100; 6763 shapeBlock.PathScaleY = 100;
6725 6764
@@ -6750,13 +6789,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6750 part.UpdateShape(shapeBlock); 6789 part.UpdateShape(shapeBlock);
6751 } 6790 }
6752 6791
6753 protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector holesize, LSL_Vector topshear, LSL_Vector profilecut, LSL_Vector taper_a, float revolutions, float radiusoffset, float skew, byte fudge) 6792 // Prim type torus, tube and ring.
6793 protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector holesize, LSL_Vector topshear, LSL_Vector profilecut, LSL_Vector taper_a, float revolutions, float radiusoffset, float skew, byte profileshape, byte pathcurve)
6754 { 6794 {
6755 ObjectShapePacket.ObjectDataBlock shapeBlock; 6795 ObjectShapePacket.ObjectDataBlock shapeBlock;
6756 6796
6757 shapeBlock = SetPrimitiveBlockShapeParams(part, holeshape, cut, hollow, twist); 6797 shapeBlock = SetPrimitiveBlockShapeParams(part, holeshape, cut, hollow, twist, profileshape, pathcurve);
6758
6759 shapeBlock.ProfileCurve += fudge;
6760 6798
6761 // profile/path swapped for a torrus, tube, ring 6799 // profile/path swapped for a torrus, tube, ring
6762 shapeBlock.PathBegin = shapeBlock.ProfileBegin; 6800 shapeBlock.PathBegin = shapeBlock.ProfileBegin;
@@ -6876,7 +6914,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6876 part.UpdateShape(shapeBlock); 6914 part.UpdateShape(shapeBlock);
6877 } 6915 }
6878 6916
6879 protected void SetPrimitiveShapeParams(SceneObjectPart part, string map, int type) 6917 // Prim type sculpt.
6918 protected void SetPrimitiveShapeParams(SceneObjectPart part, string map, int type, byte pathcurve)
6880 { 6919 {
6881 ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); 6920 ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock();
6882 UUID sculptId; 6921 UUID sculptId;
@@ -6889,6 +6928,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6889 if (sculptId == UUID.Zero) 6928 if (sculptId == UUID.Zero)
6890 return; 6929 return;
6891 6930
6931 shapeBlock.PathCurve = pathcurve;
6892 shapeBlock.ObjectLocalID = part.LocalId; 6932 shapeBlock.ObjectLocalID = part.LocalId;
6893 shapeBlock.PathScaleX = 100; 6933 shapeBlock.PathScaleX = 100;
6894 shapeBlock.PathScaleY = 150; 6934 shapeBlock.PathScaleY = 150;
@@ -6902,9 +6942,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6902 type = (int)ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE; 6942 type = (int)ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE;
6903 } 6943 }
6904 6944
6905 // retain pathcurve
6906 shapeBlock.PathCurve = part.Shape.PathCurve;
6907
6908 part.Shape.SetSculptProperties((byte)type, sculptId); 6945 part.Shape.SetSculptProperties((byte)type, sculptId);
6909 part.Shape.SculptEntry = true; 6946 part.Shape.SculptEntry = true;
6910 part.UpdateShape(shapeBlock); 6947 part.UpdateShape(shapeBlock);
@@ -7028,8 +7065,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7028 taper_b = rules.GetVector3Item(idx++); 7065 taper_b = rules.GetVector3Item(idx++);
7029 topshear = rules.GetVector3Item(idx++); 7066 topshear = rules.GetVector3Item(idx++);
7030 7067
7031 part.Shape.PathCurve = (byte)Extrusion.Straight; 7068 SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, topshear,
7032 SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, topshear, 1); 7069 (byte)ProfileShape.Square, (byte)Extrusion.Straight);
7033 break; 7070 break;
7034 7071
7035 case (int)ScriptBaseClass.PRIM_TYPE_CYLINDER: 7072 case (int)ScriptBaseClass.PRIM_TYPE_CYLINDER:
@@ -7042,9 +7079,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7042 twist = rules.GetVector3Item(idx++); 7079 twist = rules.GetVector3Item(idx++);
7043 taper_b = rules.GetVector3Item(idx++); 7080 taper_b = rules.GetVector3Item(idx++);
7044 topshear = rules.GetVector3Item(idx++); 7081 topshear = rules.GetVector3Item(idx++);
7045 part.Shape.ProfileShape = ProfileShape.Circle; 7082 SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, topshear,
7046 part.Shape.PathCurve = (byte)Extrusion.Straight; 7083 (byte)ProfileShape.Circle, (byte)Extrusion.Straight);
7047 SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, topshear, 0);
7048 break; 7084 break;
7049 7085
7050 case (int)ScriptBaseClass.PRIM_TYPE_PRISM: 7086 case (int)ScriptBaseClass.PRIM_TYPE_PRISM:
@@ -7057,8 +7093,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7057 twist = rules.GetVector3Item(idx++); 7093 twist = rules.GetVector3Item(idx++);
7058 taper_b = rules.GetVector3Item(idx++); 7094 taper_b = rules.GetVector3Item(idx++);
7059 topshear = rules.GetVector3Item(idx++); 7095 topshear = rules.GetVector3Item(idx++);
7060 part.Shape.PathCurve = (byte)Extrusion.Straight; 7096 SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, topshear,
7061 SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, topshear, 3); 7097 (byte)ProfileShape.EquilateralTriangle, (byte)Extrusion.Straight);
7062 break; 7098 break;
7063 7099
7064 case (int)ScriptBaseClass.PRIM_TYPE_SPHERE: 7100 case (int)ScriptBaseClass.PRIM_TYPE_SPHERE:
@@ -7070,8 +7106,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7070 hollow = (float)rules.GetLSLFloatItem(idx++); 7106 hollow = (float)rules.GetLSLFloatItem(idx++);
7071 twist = rules.GetVector3Item(idx++); 7107 twist = rules.GetVector3Item(idx++);
7072 taper_b = rules.GetVector3Item(idx++); // dimple 7108 taper_b = rules.GetVector3Item(idx++); // dimple
7073 part.Shape.PathCurve = (byte)Extrusion.Curve1; 7109 SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b,
7074 SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, 5); 7110 (byte)ProfileShape.HalfCircle, (byte)Extrusion.Curve1);
7075 break; 7111 break;
7076 7112
7077 case (int)ScriptBaseClass.PRIM_TYPE_TORUS: 7113 case (int)ScriptBaseClass.PRIM_TYPE_TORUS:
@@ -7089,9 +7125,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7089 revolutions = (float)rules.GetLSLFloatItem(idx++); 7125 revolutions = (float)rules.GetLSLFloatItem(idx++);
7090 radiusoffset = (float)rules.GetLSLFloatItem(idx++); 7126 radiusoffset = (float)rules.GetLSLFloatItem(idx++);
7091 skew = (float)rules.GetLSLFloatItem(idx++); 7127 skew = (float)rules.GetLSLFloatItem(idx++);
7092 part.Shape.PathCurve = (byte)Extrusion.Curve1;
7093 SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, 7128 SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b,
7094 revolutions, radiusoffset, skew, 0); 7129 revolutions, radiusoffset, skew, (byte)ProfileShape.Circle, (byte)Extrusion.Curve1);
7095 break; 7130 break;
7096 7131
7097 case (int)ScriptBaseClass.PRIM_TYPE_TUBE: 7132 case (int)ScriptBaseClass.PRIM_TYPE_TUBE:
@@ -7109,9 +7144,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7109 revolutions = (float)rules.GetLSLFloatItem(idx++); 7144 revolutions = (float)rules.GetLSLFloatItem(idx++);
7110 radiusoffset = (float)rules.GetLSLFloatItem(idx++); 7145 radiusoffset = (float)rules.GetLSLFloatItem(idx++);
7111 skew = (float)rules.GetLSLFloatItem(idx++); 7146 skew = (float)rules.GetLSLFloatItem(idx++);
7112 part.Shape.PathCurve = (byte)Extrusion.Curve1;
7113 SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, 7147 SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b,
7114 revolutions, radiusoffset, skew, 1); 7148 revolutions, radiusoffset, skew, (byte)ProfileShape.Square, (byte)Extrusion.Curve1);
7115 break; 7149 break;
7116 7150
7117 case (int)ScriptBaseClass.PRIM_TYPE_RING: 7151 case (int)ScriptBaseClass.PRIM_TYPE_RING:
@@ -7129,9 +7163,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7129 revolutions = (float)rules.GetLSLFloatItem(idx++); 7163 revolutions = (float)rules.GetLSLFloatItem(idx++);
7130 radiusoffset = (float)rules.GetLSLFloatItem(idx++); 7164 radiusoffset = (float)rules.GetLSLFloatItem(idx++);
7131 skew = (float)rules.GetLSLFloatItem(idx++); 7165 skew = (float)rules.GetLSLFloatItem(idx++);
7132 part.Shape.PathCurve = (byte)Extrusion.Curve1;
7133 SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, 7166 SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b,
7134 revolutions, radiusoffset, skew, 3); 7167 revolutions, radiusoffset, skew, (byte)ProfileShape.EquilateralTriangle, (byte)Extrusion.Curve1);
7135 break; 7168 break;
7136 7169
7137 case (int)ScriptBaseClass.PRIM_TYPE_SCULPT: 7170 case (int)ScriptBaseClass.PRIM_TYPE_SCULPT:
@@ -7140,8 +7173,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7140 7173
7141 string map = rules.Data[idx++].ToString(); 7174 string map = rules.Data[idx++].ToString();
7142 face = (int)rules.GetLSLIntegerItem(idx++); // type 7175 face = (int)rules.GetLSLIntegerItem(idx++); // type
7143 part.Shape.PathCurve = (byte)Extrusion.Curve1; 7176 SetPrimitiveShapeParams(part, map, face, (byte)Extrusion.Curve1);
7144 SetPrimitiveShapeParams(part, map, face);
7145 break; 7177 break;
7146 } 7178 }
7147 7179
@@ -7428,7 +7460,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7428 Quaternion q; 7460 Quaternion q;
7429 if (m_host.ParentGroup.RootPart.AttachmentPoint != 0) 7461 if (m_host.ParentGroup.RootPart.AttachmentPoint != 0)
7430 { 7462 {
7431 ScenePresence avatar = World.GetScenePresence(m_host.AttachedAvatar); 7463 ScenePresence avatar = World.GetScenePresence(m_host.ParentGroup.AttachedAvatar);
7432 if (avatar != null) 7464 if (avatar != null)
7433 if ((avatar.AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0) 7465 if ((avatar.AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0)
7434 q = avatar.CameraRotation; // Mouselook 7466 q = avatar.CameraRotation; // Mouselook
@@ -10486,12 +10518,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10486 NotImplemented("llGetUsedMemory"); 10518 NotImplemented("llGetUsedMemory");
10487 } 10519 }
10488 10520
10489 public void llRegionSayTo(LSL_Key target, LSL_Integer channel, LSL_String msg)
10490 {
10491 m_host.AddScriptLPS(1);
10492 NotImplemented("llRegionSayTo");
10493 }
10494
10495 public void llScriptProfiler(LSL_Integer flags) 10521 public void llScriptProfiler(LSL_Integer flags)
10496 { 10522 {
10497 m_host.AddScriptLPS(1); 10523 m_host.AddScriptLPS(1);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
index e53a61a..bf74760 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
@@ -308,7 +308,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
308 // In attachments, the sensor cone always orients with the 308 // In attachments, the sensor cone always orients with the
309 // avatar rotation. This may include a nonzero elevation if 309 // avatar rotation. This may include a nonzero elevation if
310 // in mouselook. 310 // in mouselook.
311 ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.RootPart.AttachedAvatar); 311 ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar);
312 q = avatar.Rotation; 312 q = avatar.Rotation;
313 } 313 }
314 LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); 314 LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W);
@@ -428,7 +428,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
428 // In attachments, the sensor cone always orients with the 428 // In attachments, the sensor cone always orients with the
429 // avatar rotation. This may include a nonzero elevation if 429 // avatar rotation. This may include a nonzero elevation if
430 // in mouselook. 430 // in mouselook.
431 ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.RootPart.AttachedAvatar); 431 ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar);
432 q = avatar.Rotation; 432 q = avatar.Rotation;
433 } 433 }
434 434
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
index 27f9c84..4d7d60d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
@@ -271,6 +271,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
271 void llPushObject(string target, LSL_Vector impulse, LSL_Vector ang_impulse, int local); 271 void llPushObject(string target, LSL_Vector impulse, LSL_Vector ang_impulse, int local);
272 void llRefreshPrimURL(); 272 void llRefreshPrimURL();
273 void llRegionSay(int channelID, string text); 273 void llRegionSay(int channelID, string text);
274 void llRegionSayTo(string target, int channelID, string text);
274 void llReleaseCamera(string avatar); 275 void llReleaseCamera(string avatar);
275 void llReleaseControls(); 276 void llReleaseControls();
276 void llReleaseURL(string url); 277 void llReleaseURL(string url);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
index 303d75e..96e46fd 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
@@ -1199,6 +1199,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
1199 m_LSL_Functions.llRegionSay(channelID, text); 1199 m_LSL_Functions.llRegionSay(channelID, text);
1200 } 1200 }
1201 1201
1202 public void llRegionSayTo(string key, int channelID, string text)
1203 {
1204 m_LSL_Functions.llRegionSayTo(key, channelID, text);
1205 }
1206
1202 public void llReleaseCamera(string avatar) 1207 public void llReleaseCamera(string avatar)
1203 { 1208 {
1204 m_LSL_Functions.llReleaseCamera(avatar); 1209 m_LSL_Functions.llReleaseCamera(avatar);