diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 390 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs | 2 |
2 files changed, 199 insertions, 193 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 8f82304..0c373b9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -221,8 +221,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
221 | 221 | ||
222 | public List<SceneObjectPart> GetLinkParts(int linkType) | 222 | public List<SceneObjectPart> GetLinkParts(int linkType) |
223 | { | 223 | { |
224 | List<SceneObjectPart> ret = new List<SceneObjectPart>(); | 224 | List<SceneObjectPart> ret = new List<SceneObjectPart>(); |
225 | if (m_host == null || m_host.ParentGroup == null || m_host.ParentGroup.IsDeleted) | 225 | if (m_host == null || m_host.ParentGroup == null || m_host.ParentGroup.IsDeleted) |
226 | return ret; | 226 | return ret; |
227 | ret.Add(m_host); | 227 | ret.Add(m_host); |
228 | 228 | ||
@@ -1115,6 +1115,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1115 | return detectedParams.TouchUV; | 1115 | return detectedParams.TouchUV; |
1116 | } | 1116 | } |
1117 | 1117 | ||
1118 | [DebuggerNonUserCode] | ||
1118 | public virtual void llDie() | 1119 | public virtual void llDie() |
1119 | { | 1120 | { |
1120 | m_host.AddScriptLPS(1); | 1121 | m_host.AddScriptLPS(1); |
@@ -1190,8 +1191,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1190 | } | 1191 | } |
1191 | 1192 | ||
1192 | public void llSetStatus(int status, int value) | 1193 | public void llSetStatus(int status, int value) |
1193 | { | 1194 | { |
1194 | if (m_host == null || m_host.ParentGroup == null || m_host.ParentGroup.IsDeleted) | 1195 | if (m_host == null || m_host.ParentGroup == null || m_host.ParentGroup.IsDeleted) |
1195 | return; | 1196 | return; |
1196 | m_host.AddScriptLPS(1); | 1197 | m_host.AddScriptLPS(1); |
1197 | 1198 | ||
@@ -1367,7 +1368,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1367 | } | 1368 | } |
1368 | 1369 | ||
1369 | protected void SetScale(SceneObjectPart part, LSL_Vector scale) | 1370 | protected void SetScale(SceneObjectPart part, LSL_Vector scale) |
1370 | { | 1371 | { |
1371 | // TODO: this needs to trigger a persistance save as well | 1372 | // TODO: this needs to trigger a persistance save as well |
1372 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1373 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1373 | return; | 1374 | return; |
@@ -1426,8 +1427,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1426 | } | 1427 | } |
1427 | 1428 | ||
1428 | protected void SetColor(SceneObjectPart part, LSL_Vector color, int face) | 1429 | protected void SetColor(SceneObjectPart part, LSL_Vector color, int face) |
1429 | { | 1430 | { |
1430 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1431 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1431 | return; | 1432 | return; |
1432 | 1433 | ||
1433 | Primitive.TextureEntry tex = part.Shape.Textures; | 1434 | Primitive.TextureEntry tex = part.Shape.Textures; |
@@ -1471,8 +1472,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1471 | } | 1472 | } |
1472 | 1473 | ||
1473 | public void SetTexGen(SceneObjectPart part, int face,int style) | 1474 | public void SetTexGen(SceneObjectPart part, int face,int style) |
1474 | { | 1475 | { |
1475 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1476 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1476 | return; | 1477 | return; |
1477 | 1478 | ||
1478 | Primitive.TextureEntry tex = part.Shape.Textures; | 1479 | Primitive.TextureEntry tex = part.Shape.Textures; |
@@ -1504,8 +1505,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1504 | } | 1505 | } |
1505 | 1506 | ||
1506 | public void SetGlow(SceneObjectPart part, int face, float glow) | 1507 | public void SetGlow(SceneObjectPart part, int face, float glow) |
1507 | { | 1508 | { |
1508 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1509 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1509 | return; | 1510 | return; |
1510 | 1511 | ||
1511 | Primitive.TextureEntry tex = part.Shape.Textures; | 1512 | Primitive.TextureEntry tex = part.Shape.Textures; |
@@ -1532,8 +1533,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1532 | } | 1533 | } |
1533 | 1534 | ||
1534 | public void SetShiny(SceneObjectPart part, int face, int shiny, Bumpiness bump) | 1535 | public void SetShiny(SceneObjectPart part, int face, int shiny, Bumpiness bump) |
1535 | { | 1536 | { |
1536 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1537 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1537 | return; | 1538 | return; |
1538 | 1539 | ||
1539 | Shininess sval = new Shininess(); | 1540 | Shininess sval = new Shininess(); |
@@ -1584,8 +1585,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1584 | } | 1585 | } |
1585 | 1586 | ||
1586 | public void SetFullBright(SceneObjectPart part, int face, bool bright) | 1587 | public void SetFullBright(SceneObjectPart part, int face, bool bright) |
1587 | { | 1588 | { |
1588 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1589 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1589 | return; | 1590 | return; |
1590 | 1591 | ||
1591 | Primitive.TextureEntry tex = part.Shape.Textures; | 1592 | Primitive.TextureEntry tex = part.Shape.Textures; |
@@ -1654,8 +1655,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1654 | } | 1655 | } |
1655 | 1656 | ||
1656 | protected void SetAlpha(SceneObjectPart part, double alpha, int face) | 1657 | protected void SetAlpha(SceneObjectPart part, double alpha, int face) |
1657 | { | 1658 | { |
1658 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1659 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1659 | return; | 1660 | return; |
1660 | 1661 | ||
1661 | Primitive.TextureEntry tex = part.Shape.Textures; | 1662 | Primitive.TextureEntry tex = part.Shape.Textures; |
@@ -1702,8 +1703,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1702 | /// <param name="Force"></param> | 1703 | /// <param name="Force"></param> |
1703 | protected void SetFlexi(SceneObjectPart part, bool flexi, int softness, float gravity, float friction, | 1704 | protected void SetFlexi(SceneObjectPart part, bool flexi, int softness, float gravity, float friction, |
1704 | float wind, float tension, LSL_Vector Force) | 1705 | float wind, float tension, LSL_Vector Force) |
1705 | { | 1706 | { |
1706 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1707 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1707 | return; | 1708 | return; |
1708 | 1709 | ||
1709 | if (flexi) | 1710 | if (flexi) |
@@ -1737,8 +1738,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1737 | /// <param name="radius"></param> | 1738 | /// <param name="radius"></param> |
1738 | /// <param name="falloff"></param> | 1739 | /// <param name="falloff"></param> |
1739 | protected void SetPointLight(SceneObjectPart part, bool light, LSL_Vector color, float intensity, float radius, float falloff) | 1740 | protected void SetPointLight(SceneObjectPart part, bool light, LSL_Vector color, float intensity, float radius, float falloff) |
1740 | { | 1741 | { |
1741 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1742 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1742 | return; | 1743 | return; |
1743 | 1744 | ||
1744 | if (light) | 1745 | if (light) |
@@ -1823,8 +1824,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1823 | } | 1824 | } |
1824 | 1825 | ||
1825 | protected void SetTexture(SceneObjectPart part, string texture, int face) | 1826 | protected void SetTexture(SceneObjectPart part, string texture, int face) |
1826 | { | 1827 | { |
1827 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1828 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1828 | return; | 1829 | return; |
1829 | 1830 | ||
1830 | UUID textureID=new UUID(); | 1831 | UUID textureID=new UUID(); |
@@ -1871,8 +1872,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1871 | } | 1872 | } |
1872 | 1873 | ||
1873 | protected void ScaleTexture(SceneObjectPart part, double u, double v, int face) | 1874 | protected void ScaleTexture(SceneObjectPart part, double u, double v, int face) |
1874 | { | 1875 | { |
1875 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1876 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1876 | return; | 1877 | return; |
1877 | 1878 | ||
1878 | Primitive.TextureEntry tex = part.Shape.Textures; | 1879 | Primitive.TextureEntry tex = part.Shape.Textures; |
@@ -1910,8 +1911,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1910 | } | 1911 | } |
1911 | 1912 | ||
1912 | protected void OffsetTexture(SceneObjectPart part, double u, double v, int face) | 1913 | protected void OffsetTexture(SceneObjectPart part, double u, double v, int face) |
1913 | { | 1914 | { |
1914 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1915 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1915 | return; | 1916 | return; |
1916 | 1917 | ||
1917 | Primitive.TextureEntry tex = part.Shape.Textures; | 1918 | Primitive.TextureEntry tex = part.Shape.Textures; |
@@ -1949,8 +1950,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1949 | } | 1950 | } |
1950 | 1951 | ||
1951 | protected void RotateTexture(SceneObjectPart part, double rotation, int face) | 1952 | protected void RotateTexture(SceneObjectPart part, double rotation, int face) |
1952 | { | 1953 | { |
1953 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1954 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1954 | return; | 1955 | return; |
1955 | 1956 | ||
1956 | Primitive.TextureEntry tex = part.Shape.Textures; | 1957 | Primitive.TextureEntry tex = part.Shape.Textures; |
@@ -2022,8 +2023,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2022 | } | 2023 | } |
2023 | 2024 | ||
2024 | protected void SetPos(SceneObjectPart part, LSL_Vector targetPos) | 2025 | protected void SetPos(SceneObjectPart part, LSL_Vector targetPos) |
2025 | { | 2026 | { |
2026 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 2027 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
2027 | return; | 2028 | return; |
2028 | 2029 | ||
2029 | // Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos) | 2030 | // Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos) |
@@ -2119,8 +2120,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2119 | } | 2120 | } |
2120 | 2121 | ||
2121 | protected void SetRot(SceneObjectPart part, Quaternion rot) | 2122 | protected void SetRot(SceneObjectPart part, Quaternion rot) |
2122 | { | 2123 | { |
2123 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 2124 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
2124 | return; | 2125 | return; |
2125 | 2126 | ||
2126 | part.UpdateRotation(rot); | 2127 | part.UpdateRotation(rot); |
@@ -4019,7 +4020,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4019 | bucket); | 4020 | bucket); |
4020 | 4021 | ||
4021 | if (m_TransferModule != null) | 4022 | if (m_TransferModule != null) |
4022 | m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); | 4023 | m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); |
4023 | 4024 | ||
4024 | //This delay should only occur when giving inventory to avatars. | 4025 | //This delay should only occur when giving inventory to avatars. |
4025 | ScriptSleep(3000); | 4026 | ScriptSleep(3000); |
@@ -4194,6 +4195,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4194 | ScenePresence presence = World.GetScenePresence(agentId); | 4195 | ScenePresence presence = World.GetScenePresence(agentId); |
4195 | if (presence != null) | 4196 | if (presence != null) |
4196 | { | 4197 | { |
4198 | // agent must not be a god | ||
4199 | if (presence.GodLevel >= 200) return; | ||
4200 | |||
4197 | // agent must be over the owners land | 4201 | // agent must be over the owners land |
4198 | if (m_host.OwnerID == World.LandChannel.GetLandObject( | 4202 | if (m_host.OwnerID == World.LandChannel.GetLandObject( |
4199 | presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) | 4203 | presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) |
@@ -6689,9 +6693,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6689 | } | 6693 | } |
6690 | 6694 | ||
6691 | protected ObjectShapePacket.ObjectDataBlock SetPrimitiveBlockShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist) | 6695 | protected ObjectShapePacket.ObjectDataBlock SetPrimitiveBlockShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist) |
6692 | { | 6696 | { |
6693 | ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); | 6697 | ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); |
6694 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 6698 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
6695 | return shapeBlock; | 6699 | return shapeBlock; |
6696 | 6700 | ||
6697 | if (holeshape != (int)ScriptBaseClass.PRIM_HOLE_DEFAULT && | 6701 | if (holeshape != (int)ScriptBaseClass.PRIM_HOLE_DEFAULT && |
@@ -6762,8 +6766,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6762 | } | 6766 | } |
6763 | 6767 | ||
6764 | protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector taper_b, LSL_Vector topshear, byte fudge) | 6768 | protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector taper_b, LSL_Vector topshear, byte fudge) |
6765 | { | 6769 | { |
6766 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 6770 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
6767 | return; | 6771 | return; |
6768 | 6772 | ||
6769 | ObjectShapePacket.ObjectDataBlock shapeBlock; | 6773 | ObjectShapePacket.ObjectDataBlock shapeBlock; |
@@ -6814,8 +6818,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6814 | } | 6818 | } |
6815 | 6819 | ||
6816 | protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector dimple, byte fudge) | 6820 | protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector dimple, byte fudge) |
6817 | { | 6821 | { |
6818 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 6822 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
6819 | return; | 6823 | return; |
6820 | 6824 | ||
6821 | ObjectShapePacket.ObjectDataBlock shapeBlock; | 6825 | ObjectShapePacket.ObjectDataBlock shapeBlock; |
@@ -6859,8 +6863,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6859 | } | 6863 | } |
6860 | 6864 | ||
6861 | 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) | 6865 | 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) |
6862 | { | 6866 | { |
6863 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 6867 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
6864 | return; | 6868 | return; |
6865 | 6869 | ||
6866 | ObjectShapePacket.ObjectDataBlock shapeBlock; | 6870 | ObjectShapePacket.ObjectDataBlock shapeBlock; |
@@ -6983,8 +6987,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6983 | } | 6987 | } |
6984 | 6988 | ||
6985 | protected void SetPrimitiveShapeParams(SceneObjectPart part, string map, int type) | 6989 | protected void SetPrimitiveShapeParams(SceneObjectPart part, string map, int type) |
6986 | { | 6990 | { |
6987 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 6991 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
6988 | return; | 6992 | return; |
6989 | 6993 | ||
6990 | ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); | 6994 | ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); |
@@ -7020,13 +7024,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7020 | } | 7024 | } |
7021 | 7025 | ||
7022 | public void llSetPrimitiveParams(LSL_List rules) | 7026 | public void llSetPrimitiveParams(LSL_List rules) |
7023 | { | 7027 | { |
7024 | m_host.AddScriptLPS(1); | 7028 | m_host.AddScriptLPS(1); |
7025 | SetPrimParams(m_host, rules); | 7029 | SetPrimParams(m_host, rules); |
7026 | } | 7030 | } |
7027 | 7031 | ||
7028 | public void llSetLinkPrimitiveParams(int linknumber, LSL_List rules) | 7032 | public void llSetLinkPrimitiveParams(int linknumber, LSL_List rules) |
7029 | { | 7033 | { |
7030 | m_host.AddScriptLPS(1); | 7034 | m_host.AddScriptLPS(1); |
7031 | 7035 | ||
7032 | List<SceneObjectPart> parts = GetLinkParts(linknumber); | 7036 | List<SceneObjectPart> parts = GetLinkParts(linknumber); |
@@ -7041,8 +7045,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7041 | } | 7045 | } |
7042 | 7046 | ||
7043 | protected void SetPrimParams(SceneObjectPart part, LSL_List rules) | 7047 | protected void SetPrimParams(SceneObjectPart part, LSL_List rules) |
7044 | { | 7048 | { |
7045 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 7049 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
7046 | return; | 7050 | return; |
7047 | 7051 | ||
7048 | int idx = 0; | 7052 | int idx = 0; |
@@ -7875,96 +7879,96 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7875 | } | 7879 | } |
7876 | break; | 7880 | break; |
7877 | 7881 | ||
7878 | case (int)ScriptBaseClass.PRIM_BUMP_SHINY: | 7882 | case (int)ScriptBaseClass.PRIM_BUMP_SHINY: |
7879 | if (remain < 1) | 7883 | if (remain < 1) |
7880 | return res; | 7884 | return res; |
7881 | face = (int)rules.GetLSLIntegerItem(idx++); | 7885 | face = (int)rules.GetLSLIntegerItem(idx++); |
7882 | 7886 | ||
7883 | tex = part.Shape.Textures; | 7887 | tex = part.Shape.Textures; |
7884 | int shiny; | 7888 | int shiny; |
7885 | if (face == ScriptBaseClass.ALL_SIDES) | 7889 | if (face == ScriptBaseClass.ALL_SIDES) |
7886 | { | 7890 | { |
7887 | for (face = 0; face < GetNumberOfSides(part); face++) | 7891 | for (face = 0; face < GetNumberOfSides(part); face++) |
7888 | { | 7892 | { |
7889 | Shininess shinyness = tex.GetFace((uint)face).Shiny; | 7893 | Shininess shinyness = tex.GetFace((uint)face).Shiny; |
7890 | if (shinyness == Shininess.High) | 7894 | if (shinyness == Shininess.High) |
7891 | { | 7895 | { |
7892 | shiny = ScriptBaseClass.PRIM_SHINY_HIGH; | 7896 | shiny = ScriptBaseClass.PRIM_SHINY_HIGH; |
7893 | } | 7897 | } |
7894 | else if (shinyness == Shininess.Medium) | 7898 | else if (shinyness == Shininess.Medium) |
7895 | { | 7899 | { |
7896 | shiny = ScriptBaseClass.PRIM_SHINY_MEDIUM; | 7900 | shiny = ScriptBaseClass.PRIM_SHINY_MEDIUM; |
7897 | } | 7901 | } |
7898 | else if (shinyness == Shininess.Low) | 7902 | else if (shinyness == Shininess.Low) |
7899 | { | 7903 | { |
7900 | shiny = ScriptBaseClass.PRIM_SHINY_LOW; | 7904 | shiny = ScriptBaseClass.PRIM_SHINY_LOW; |
7901 | } | 7905 | } |
7902 | else | 7906 | else |
7903 | { | 7907 | { |
7904 | shiny = ScriptBaseClass.PRIM_SHINY_NONE; | 7908 | shiny = ScriptBaseClass.PRIM_SHINY_NONE; |
7905 | } | 7909 | } |
7906 | res.Add(new LSL_Integer(shiny)); | 7910 | res.Add(new LSL_Integer(shiny)); |
7907 | res.Add(new LSL_Integer((int)tex.GetFace((uint)face).Bump)); | 7911 | res.Add(new LSL_Integer((int)tex.GetFace((uint)face).Bump)); |
7908 | } | 7912 | } |
7909 | } | 7913 | } |
7910 | else | 7914 | else |
7911 | { | 7915 | { |
7912 | Shininess shinyness = tex.GetFace((uint)face).Shiny; | 7916 | Shininess shinyness = tex.GetFace((uint)face).Shiny; |
7913 | if (shinyness == Shininess.High) | 7917 | if (shinyness == Shininess.High) |
7914 | { | 7918 | { |
7915 | shiny = ScriptBaseClass.PRIM_SHINY_HIGH; | 7919 | shiny = ScriptBaseClass.PRIM_SHINY_HIGH; |
7916 | } | 7920 | } |
7917 | else if (shinyness == Shininess.Medium) | 7921 | else if (shinyness == Shininess.Medium) |
7918 | { | 7922 | { |
7919 | shiny = ScriptBaseClass.PRIM_SHINY_MEDIUM; | 7923 | shiny = ScriptBaseClass.PRIM_SHINY_MEDIUM; |
7920 | } | 7924 | } |
7921 | else if (shinyness == Shininess.Low) | 7925 | else if (shinyness == Shininess.Low) |
7922 | { | 7926 | { |
7923 | shiny = ScriptBaseClass.PRIM_SHINY_LOW; | 7927 | shiny = ScriptBaseClass.PRIM_SHINY_LOW; |
7924 | } | 7928 | } |
7925 | else | 7929 | else |
7926 | { | 7930 | { |
7927 | shiny = ScriptBaseClass.PRIM_SHINY_NONE; | 7931 | shiny = ScriptBaseClass.PRIM_SHINY_NONE; |
7928 | } | 7932 | } |
7929 | res.Add(new LSL_Integer(shiny)); | 7933 | res.Add(new LSL_Integer(shiny)); |
7930 | res.Add(new LSL_Integer((int)tex.GetFace((uint)face).Bump)); | 7934 | res.Add(new LSL_Integer((int)tex.GetFace((uint)face).Bump)); |
7931 | } | 7935 | } |
7932 | break; | 7936 | break; |
7933 | 7937 | ||
7934 | case (int)ScriptBaseClass.PRIM_FULLBRIGHT: | 7938 | case (int)ScriptBaseClass.PRIM_FULLBRIGHT: |
7935 | if (remain < 1) | 7939 | if (remain < 1) |
7936 | return res; | 7940 | return res; |
7937 | face = (int)rules.GetLSLIntegerItem(idx++); | 7941 | face = (int)rules.GetLSLIntegerItem(idx++); |
7938 | 7942 | ||
7939 | tex = part.Shape.Textures; | 7943 | tex = part.Shape.Textures; |
7940 | int fullbright; | 7944 | int fullbright; |
7941 | if (face == ScriptBaseClass.ALL_SIDES) | 7945 | if (face == ScriptBaseClass.ALL_SIDES) |
7942 | { | 7946 | { |
7943 | for (face = 0; face < GetNumberOfSides(part); face++) | 7947 | for (face = 0; face < GetNumberOfSides(part); face++) |
7944 | { | 7948 | { |
7945 | if (tex.GetFace((uint)face).Fullbright == true) | 7949 | if (tex.GetFace((uint)face).Fullbright == true) |
7946 | { | 7950 | { |
7947 | fullbright = ScriptBaseClass.TRUE; | 7951 | fullbright = ScriptBaseClass.TRUE; |
7948 | } | 7952 | } |
7949 | else | 7953 | else |
7950 | { | 7954 | { |
7951 | fullbright = ScriptBaseClass.FALSE; | 7955 | fullbright = ScriptBaseClass.FALSE; |
7952 | } | 7956 | } |
7953 | res.Add(new LSL_Integer(fullbright)); | 7957 | res.Add(new LSL_Integer(fullbright)); |
7954 | } | 7958 | } |
7955 | } | 7959 | } |
7956 | else | 7960 | else |
7957 | { | 7961 | { |
7958 | if (tex.GetFace((uint)face).Fullbright == true) | 7962 | if (tex.GetFace((uint)face).Fullbright == true) |
7959 | { | 7963 | { |
7960 | fullbright = ScriptBaseClass.TRUE; | 7964 | fullbright = ScriptBaseClass.TRUE; |
7961 | } | 7965 | } |
7962 | else | 7966 | else |
7963 | { | 7967 | { |
7964 | fullbright = ScriptBaseClass.FALSE; | 7968 | fullbright = ScriptBaseClass.FALSE; |
7965 | } | 7969 | } |
7966 | res.Add(new LSL_Integer(fullbright)); | 7970 | res.Add(new LSL_Integer(fullbright)); |
7967 | } | 7971 | } |
7968 | break; | 7972 | break; |
7969 | 7973 | ||
7970 | case (int)ScriptBaseClass.PRIM_FLEXIBLE: | 7974 | case (int)ScriptBaseClass.PRIM_FLEXIBLE: |
@@ -7985,37 +7989,37 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7985 | break; | 7989 | break; |
7986 | 7990 | ||
7987 | case (int)ScriptBaseClass.PRIM_TEXGEN: | 7991 | case (int)ScriptBaseClass.PRIM_TEXGEN: |
7988 | // (PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR) | 7992 | // (PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR) |
7989 | if (remain < 1) | 7993 | if (remain < 1) |
7990 | return res; | 7994 | return res; |
7991 | face = (int)rules.GetLSLIntegerItem(idx++); | 7995 | face = (int)rules.GetLSLIntegerItem(idx++); |
7992 | 7996 | ||
7993 | tex = part.Shape.Textures; | 7997 | tex = part.Shape.Textures; |
7994 | if (face == ScriptBaseClass.ALL_SIDES) | 7998 | if (face == ScriptBaseClass.ALL_SIDES) |
7995 | { | 7999 | { |
7996 | for (face = 0; face < GetNumberOfSides(part); face++) | 8000 | for (face = 0; face < GetNumberOfSides(part); face++) |
7997 | { | 8001 | { |
7998 | if (tex.GetFace((uint)face).TexMapType == MappingType.Planar) | 8002 | if (tex.GetFace((uint)face).TexMapType == MappingType.Planar) |
7999 | { | 8003 | { |
8000 | res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_PLANAR)); | 8004 | res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_PLANAR)); |
8001 | } | 8005 | } |
8002 | else | 8006 | else |
8003 | { | 8007 | { |
8004 | res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_DEFAULT)); | 8008 | res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_DEFAULT)); |
8005 | } | 8009 | } |
8006 | } | 8010 | } |
8007 | } | 8011 | } |
8008 | else | 8012 | else |
8009 | { | 8013 | { |
8010 | if (tex.GetFace((uint)face).TexMapType == MappingType.Planar) | 8014 | if (tex.GetFace((uint)face).TexMapType == MappingType.Planar) |
8011 | { | 8015 | { |
8012 | res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_PLANAR)); | 8016 | res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_PLANAR)); |
8013 | } | 8017 | } |
8014 | else | 8018 | else |
8015 | { | 8019 | { |
8016 | res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_DEFAULT)); | 8020 | res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_DEFAULT)); |
8017 | } | 8021 | } |
8018 | } | 8022 | } |
8019 | break; | 8023 | break; |
8020 | 8024 | ||
8021 | case (int)ScriptBaseClass.PRIM_POINT_LIGHT: | 8025 | case (int)ScriptBaseClass.PRIM_POINT_LIGHT: |
@@ -8033,26 +8037,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8033 | res.Add(new LSL_Float(shape.LightFalloff)); // falloff | 8037 | res.Add(new LSL_Float(shape.LightFalloff)); // falloff |
8034 | break; | 8038 | break; |
8035 | 8039 | ||
8036 | case (int)ScriptBaseClass.PRIM_GLOW: | 8040 | case (int)ScriptBaseClass.PRIM_GLOW: |
8037 | if (remain < 1) | 8041 | if (remain < 1) |
8038 | return res; | 8042 | return res; |
8039 | face = (int)rules.GetLSLIntegerItem(idx++); | 8043 | face = (int)rules.GetLSLIntegerItem(idx++); |
8040 | 8044 | ||
8041 | tex = part.Shape.Textures; | 8045 | tex = part.Shape.Textures; |
8042 | float primglow; | 8046 | float primglow; |
8043 | if (face == ScriptBaseClass.ALL_SIDES) | 8047 | if (face == ScriptBaseClass.ALL_SIDES) |
8044 | { | 8048 | { |
8045 | for (face = 0; face < GetNumberOfSides(part); face++) | 8049 | for (face = 0; face < GetNumberOfSides(part); face++) |
8046 | { | 8050 | { |
8047 | primglow = tex.GetFace((uint)face).Glow; | 8051 | primglow = tex.GetFace((uint)face).Glow; |
8048 | res.Add(new LSL_Float(primglow)); | 8052 | res.Add(new LSL_Float(primglow)); |
8049 | } | 8053 | } |
8050 | } | 8054 | } |
8051 | else | 8055 | else |
8052 | { | 8056 | { |
8053 | primglow = tex.GetFace((uint)face).Glow; | 8057 | primglow = tex.GetFace((uint)face).Glow; |
8054 | res.Add(new LSL_Float(primglow)); | 8058 | res.Add(new LSL_Float(primglow)); |
8055 | } | 8059 | } |
8056 | break; | 8060 | break; |
8057 | case (int)ScriptBaseClass.PRIM_TEXT: | 8061 | case (int)ScriptBaseClass.PRIM_TEXT: |
8058 | Color4 textColor = part.GetTextColor(); | 8062 | Color4 textColor = part.GetTextColor(); |
@@ -9214,7 +9218,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9214 | m_host.AddScriptLPS(1); | 9218 | m_host.AddScriptLPS(1); |
9215 | 9219 | ||
9216 | if (quick_pay_buttons.Data.Length < 4) | 9220 | if (quick_pay_buttons.Data.Length < 4) |
9217 | { | 9221 | { |
9218 | int x; | 9222 | int x; |
9219 | for (x=quick_pay_buttons.Data.Length; x<= 4; x++) | 9223 | for (x=quick_pay_buttons.Data.Length; x<= 4; x++) |
9220 | { | 9224 | { |
@@ -9222,12 +9226,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9222 | } | 9226 | } |
9223 | } | 9227 | } |
9224 | int[] nPrice = new int[5]; | 9228 | int[] nPrice = new int[5]; |
9225 | nPrice[0]=price; | 9229 | nPrice[0]=price; |
9226 | nPrice[1] = (LSL_Integer)quick_pay_buttons.Data[0]; | 9230 | nPrice[1] = (LSL_Integer)quick_pay_buttons.Data[0]; |
9227 | nPrice[2] = (LSL_Integer)quick_pay_buttons.Data[1]; | 9231 | nPrice[2] = (LSL_Integer)quick_pay_buttons.Data[1]; |
9228 | nPrice[3] = (LSL_Integer)quick_pay_buttons.Data[2]; | 9232 | nPrice[3] = (LSL_Integer)quick_pay_buttons.Data[2]; |
9229 | nPrice[4] = (LSL_Integer)quick_pay_buttons.Data[3]; | 9233 | nPrice[4] = (LSL_Integer)quick_pay_buttons.Data[3]; |
9230 | m_host.ParentGroup.RootPart.PayPrice = nPrice; | 9234 | m_host.ParentGroup.RootPart.PayPrice = nPrice; |
9231 | m_host.ParentGroup.HasGroupChanged = true; | 9235 | m_host.ParentGroup.HasGroupChanged = true; |
9232 | } | 9236 | } |
9233 | 9237 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index 3339995..e86d08c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Diagnostics; //for [DebuggerNonUserCode] | ||
29 | using System.Runtime.Remoting.Lifetime; | 30 | using System.Runtime.Remoting.Lifetime; |
30 | using System.Threading; | 31 | using System.Threading; |
31 | using System.Reflection; | 32 | using System.Reflection; |
@@ -309,6 +310,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
309 | m_LSL_Functions.llDialog(avatar, message, buttons, chat_channel); | 310 | m_LSL_Functions.llDialog(avatar, message, buttons, chat_channel); |
310 | } | 311 | } |
311 | 312 | ||
313 | [DebuggerNonUserCode] | ||
312 | public void llDie() | 314 | public void llDie() |
313 | { | 315 | { |
314 | m_LSL_Functions.llDie(); | 316 | m_LSL_Functions.llDie(); |