diff options
author | Kitto Flora | 2010-03-19 13:27:12 -0400 |
---|---|---|
committer | Kitto Flora | 2010-03-19 13:27:12 -0400 |
commit | 0e36994fe7b41bb79b195130fbd9f97ace3c611f (patch) | |
tree | 2caae61161a0abaa79f0e63640b8607cc60c371a /OpenSim/Region/ScriptEngine | |
parent | Fix sit with autopilot. (diff) | |
parent | Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into ... (diff) | |
download | opensim-SC-0e36994fe7b41bb79b195130fbd9f97ace3c611f.zip opensim-SC-0e36994fe7b41bb79b195130fbd9f97ace3c611f.tar.gz opensim-SC-0e36994fe7b41bb79b195130fbd9f97ace3c611f.tar.bz2 opensim-SC-0e36994fe7b41bb79b195130fbd9f97ace3c611f.tar.xz |
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-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 8e5c203..10ebf67 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); |
@@ -4016,7 +4017,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4016 | bucket); | 4017 | bucket); |
4017 | 4018 | ||
4018 | if (m_TransferModule != null) | 4019 | if (m_TransferModule != null) |
4019 | m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); | 4020 | m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); |
4020 | 4021 | ||
4021 | //This delay should only occur when giving inventory to avatars. | 4022 | //This delay should only occur when giving inventory to avatars. |
4022 | ScriptSleep(3000); | 4023 | ScriptSleep(3000); |
@@ -4192,6 +4193,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4192 | ScenePresence presence = World.GetScenePresence(agentId); | 4193 | ScenePresence presence = World.GetScenePresence(agentId); |
4193 | if (presence != null) | 4194 | if (presence != null) |
4194 | { | 4195 | { |
4196 | // agent must not be a god | ||
4197 | if (presence.GodLevel >= 200) return; | ||
4198 | |||
4195 | // agent must be over the owners land | 4199 | // agent must be over the owners land |
4196 | if (m_host.OwnerID == World.LandChannel.GetLandObject( | 4200 | if (m_host.OwnerID == World.LandChannel.GetLandObject( |
4197 | presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) | 4201 | presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) |
@@ -6662,9 +6666,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6662 | } | 6666 | } |
6663 | 6667 | ||
6664 | protected ObjectShapePacket.ObjectDataBlock SetPrimitiveBlockShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist) | 6668 | protected ObjectShapePacket.ObjectDataBlock SetPrimitiveBlockShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist) |
6665 | { | 6669 | { |
6666 | ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); | 6670 | ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); |
6667 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 6671 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
6668 | return shapeBlock; | 6672 | return shapeBlock; |
6669 | 6673 | ||
6670 | if (holeshape != (int)ScriptBaseClass.PRIM_HOLE_DEFAULT && | 6674 | if (holeshape != (int)ScriptBaseClass.PRIM_HOLE_DEFAULT && |
@@ -6735,8 +6739,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6735 | } | 6739 | } |
6736 | 6740 | ||
6737 | protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector taper_b, LSL_Vector topshear, byte fudge) | 6741 | protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector taper_b, LSL_Vector topshear, byte fudge) |
6738 | { | 6742 | { |
6739 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 6743 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
6740 | return; | 6744 | return; |
6741 | 6745 | ||
6742 | ObjectShapePacket.ObjectDataBlock shapeBlock; | 6746 | ObjectShapePacket.ObjectDataBlock shapeBlock; |
@@ -6787,8 +6791,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6787 | } | 6791 | } |
6788 | 6792 | ||
6789 | protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector dimple, byte fudge) | 6793 | protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector dimple, byte fudge) |
6790 | { | 6794 | { |
6791 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 6795 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
6792 | return; | 6796 | return; |
6793 | 6797 | ||
6794 | ObjectShapePacket.ObjectDataBlock shapeBlock; | 6798 | ObjectShapePacket.ObjectDataBlock shapeBlock; |
@@ -6832,8 +6836,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6832 | } | 6836 | } |
6833 | 6837 | ||
6834 | 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) | 6838 | 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) |
6835 | { | 6839 | { |
6836 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 6840 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
6837 | return; | 6841 | return; |
6838 | 6842 | ||
6839 | ObjectShapePacket.ObjectDataBlock shapeBlock; | 6843 | ObjectShapePacket.ObjectDataBlock shapeBlock; |
@@ -6956,8 +6960,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6956 | } | 6960 | } |
6957 | 6961 | ||
6958 | protected void SetPrimitiveShapeParams(SceneObjectPart part, string map, int type) | 6962 | protected void SetPrimitiveShapeParams(SceneObjectPart part, string map, int type) |
6959 | { | 6963 | { |
6960 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 6964 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
6961 | return; | 6965 | return; |
6962 | 6966 | ||
6963 | ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); | 6967 | ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); |
@@ -6993,13 +6997,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6993 | } | 6997 | } |
6994 | 6998 | ||
6995 | public void llSetPrimitiveParams(LSL_List rules) | 6999 | public void llSetPrimitiveParams(LSL_List rules) |
6996 | { | 7000 | { |
6997 | m_host.AddScriptLPS(1); | 7001 | m_host.AddScriptLPS(1); |
6998 | SetPrimParams(m_host, rules); | 7002 | SetPrimParams(m_host, rules); |
6999 | } | 7003 | } |
7000 | 7004 | ||
7001 | public void llSetLinkPrimitiveParams(int linknumber, LSL_List rules) | 7005 | public void llSetLinkPrimitiveParams(int linknumber, LSL_List rules) |
7002 | { | 7006 | { |
7003 | m_host.AddScriptLPS(1); | 7007 | m_host.AddScriptLPS(1); |
7004 | 7008 | ||
7005 | List<SceneObjectPart> parts = GetLinkParts(linknumber); | 7009 | List<SceneObjectPart> parts = GetLinkParts(linknumber); |
@@ -7014,8 +7018,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7014 | } | 7018 | } |
7015 | 7019 | ||
7016 | protected void SetPrimParams(SceneObjectPart part, LSL_List rules) | 7020 | protected void SetPrimParams(SceneObjectPart part, LSL_List rules) |
7017 | { | 7021 | { |
7018 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 7022 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
7019 | return; | 7023 | return; |
7020 | 7024 | ||
7021 | int idx = 0; | 7025 | int idx = 0; |
@@ -7848,96 +7852,96 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7848 | } | 7852 | } |
7849 | break; | 7853 | break; |
7850 | 7854 | ||
7851 | case (int)ScriptBaseClass.PRIM_BUMP_SHINY: | 7855 | case (int)ScriptBaseClass.PRIM_BUMP_SHINY: |
7852 | if (remain < 1) | 7856 | if (remain < 1) |
7853 | return res; | 7857 | return res; |
7854 | face = (int)rules.GetLSLIntegerItem(idx++); | 7858 | face = (int)rules.GetLSLIntegerItem(idx++); |
7855 | 7859 | ||
7856 | tex = part.Shape.Textures; | 7860 | tex = part.Shape.Textures; |
7857 | int shiny; | 7861 | int shiny; |
7858 | if (face == ScriptBaseClass.ALL_SIDES) | 7862 | if (face == ScriptBaseClass.ALL_SIDES) |
7859 | { | 7863 | { |
7860 | for (face = 0; face < GetNumberOfSides(part); face++) | 7864 | for (face = 0; face < GetNumberOfSides(part); face++) |
7861 | { | 7865 | { |
7862 | Shininess shinyness = tex.GetFace((uint)face).Shiny; | 7866 | Shininess shinyness = tex.GetFace((uint)face).Shiny; |
7863 | if (shinyness == Shininess.High) | 7867 | if (shinyness == Shininess.High) |
7864 | { | 7868 | { |
7865 | shiny = ScriptBaseClass.PRIM_SHINY_HIGH; | 7869 | shiny = ScriptBaseClass.PRIM_SHINY_HIGH; |
7866 | } | 7870 | } |
7867 | else if (shinyness == Shininess.Medium) | 7871 | else if (shinyness == Shininess.Medium) |
7868 | { | 7872 | { |
7869 | shiny = ScriptBaseClass.PRIM_SHINY_MEDIUM; | 7873 | shiny = ScriptBaseClass.PRIM_SHINY_MEDIUM; |
7870 | } | 7874 | } |
7871 | else if (shinyness == Shininess.Low) | 7875 | else if (shinyness == Shininess.Low) |
7872 | { | 7876 | { |
7873 | shiny = ScriptBaseClass.PRIM_SHINY_LOW; | 7877 | shiny = ScriptBaseClass.PRIM_SHINY_LOW; |
7874 | } | 7878 | } |
7875 | else | 7879 | else |
7876 | { | 7880 | { |
7877 | shiny = ScriptBaseClass.PRIM_SHINY_NONE; | 7881 | shiny = ScriptBaseClass.PRIM_SHINY_NONE; |
7878 | } | 7882 | } |
7879 | res.Add(new LSL_Integer(shiny)); | 7883 | res.Add(new LSL_Integer(shiny)); |
7880 | res.Add(new LSL_Integer((int)tex.GetFace((uint)face).Bump)); | 7884 | res.Add(new LSL_Integer((int)tex.GetFace((uint)face).Bump)); |
7881 | } | 7885 | } |
7882 | } | 7886 | } |
7883 | else | 7887 | else |
7884 | { | 7888 | { |
7885 | Shininess shinyness = tex.GetFace((uint)face).Shiny; | 7889 | Shininess shinyness = tex.GetFace((uint)face).Shiny; |
7886 | if (shinyness == Shininess.High) | 7890 | if (shinyness == Shininess.High) |
7887 | { | 7891 | { |
7888 | shiny = ScriptBaseClass.PRIM_SHINY_HIGH; | 7892 | shiny = ScriptBaseClass.PRIM_SHINY_HIGH; |
7889 | } | 7893 | } |
7890 | else if (shinyness == Shininess.Medium) | 7894 | else if (shinyness == Shininess.Medium) |
7891 | { | 7895 | { |
7892 | shiny = ScriptBaseClass.PRIM_SHINY_MEDIUM; | 7896 | shiny = ScriptBaseClass.PRIM_SHINY_MEDIUM; |
7893 | } | 7897 | } |
7894 | else if (shinyness == Shininess.Low) | 7898 | else if (shinyness == Shininess.Low) |
7895 | { | 7899 | { |
7896 | shiny = ScriptBaseClass.PRIM_SHINY_LOW; | 7900 | shiny = ScriptBaseClass.PRIM_SHINY_LOW; |
7897 | } | 7901 | } |
7898 | else | 7902 | else |
7899 | { | 7903 | { |
7900 | shiny = ScriptBaseClass.PRIM_SHINY_NONE; | 7904 | shiny = ScriptBaseClass.PRIM_SHINY_NONE; |
7901 | } | 7905 | } |
7902 | res.Add(new LSL_Integer(shiny)); | 7906 | res.Add(new LSL_Integer(shiny)); |
7903 | res.Add(new LSL_Integer((int)tex.GetFace((uint)face).Bump)); | 7907 | res.Add(new LSL_Integer((int)tex.GetFace((uint)face).Bump)); |
7904 | } | 7908 | } |
7905 | break; | 7909 | break; |
7906 | 7910 | ||
7907 | case (int)ScriptBaseClass.PRIM_FULLBRIGHT: | 7911 | case (int)ScriptBaseClass.PRIM_FULLBRIGHT: |
7908 | if (remain < 1) | 7912 | if (remain < 1) |
7909 | return res; | 7913 | return res; |
7910 | face = (int)rules.GetLSLIntegerItem(idx++); | 7914 | face = (int)rules.GetLSLIntegerItem(idx++); |
7911 | 7915 | ||
7912 | tex = part.Shape.Textures; | 7916 | tex = part.Shape.Textures; |
7913 | int fullbright; | 7917 | int fullbright; |
7914 | if (face == ScriptBaseClass.ALL_SIDES) | 7918 | if (face == ScriptBaseClass.ALL_SIDES) |
7915 | { | 7919 | { |
7916 | for (face = 0; face < GetNumberOfSides(part); face++) | 7920 | for (face = 0; face < GetNumberOfSides(part); face++) |
7917 | { | 7921 | { |
7918 | if (tex.GetFace((uint)face).Fullbright == true) | 7922 | if (tex.GetFace((uint)face).Fullbright == true) |
7919 | { | 7923 | { |
7920 | fullbright = ScriptBaseClass.TRUE; | 7924 | fullbright = ScriptBaseClass.TRUE; |
7921 | } | 7925 | } |
7922 | else | 7926 | else |
7923 | { | 7927 | { |
7924 | fullbright = ScriptBaseClass.FALSE; | 7928 | fullbright = ScriptBaseClass.FALSE; |
7925 | } | 7929 | } |
7926 | res.Add(new LSL_Integer(fullbright)); | 7930 | res.Add(new LSL_Integer(fullbright)); |
7927 | } | 7931 | } |
7928 | } | 7932 | } |
7929 | else | 7933 | else |
7930 | { | 7934 | { |
7931 | if (tex.GetFace((uint)face).Fullbright == true) | 7935 | if (tex.GetFace((uint)face).Fullbright == true) |
7932 | { | 7936 | { |
7933 | fullbright = ScriptBaseClass.TRUE; | 7937 | fullbright = ScriptBaseClass.TRUE; |
7934 | } | 7938 | } |
7935 | else | 7939 | else |
7936 | { | 7940 | { |
7937 | fullbright = ScriptBaseClass.FALSE; | 7941 | fullbright = ScriptBaseClass.FALSE; |
7938 | } | 7942 | } |
7939 | res.Add(new LSL_Integer(fullbright)); | 7943 | res.Add(new LSL_Integer(fullbright)); |
7940 | } | 7944 | } |
7941 | break; | 7945 | break; |
7942 | 7946 | ||
7943 | case (int)ScriptBaseClass.PRIM_FLEXIBLE: | 7947 | case (int)ScriptBaseClass.PRIM_FLEXIBLE: |
@@ -7958,37 +7962,37 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7958 | break; | 7962 | break; |
7959 | 7963 | ||
7960 | case (int)ScriptBaseClass.PRIM_TEXGEN: | 7964 | case (int)ScriptBaseClass.PRIM_TEXGEN: |
7961 | // (PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR) | 7965 | // (PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR) |
7962 | if (remain < 1) | 7966 | if (remain < 1) |
7963 | return res; | 7967 | return res; |
7964 | face = (int)rules.GetLSLIntegerItem(idx++); | 7968 | face = (int)rules.GetLSLIntegerItem(idx++); |
7965 | 7969 | ||
7966 | tex = part.Shape.Textures; | 7970 | tex = part.Shape.Textures; |
7967 | if (face == ScriptBaseClass.ALL_SIDES) | 7971 | if (face == ScriptBaseClass.ALL_SIDES) |
7968 | { | 7972 | { |
7969 | for (face = 0; face < GetNumberOfSides(part); face++) | 7973 | for (face = 0; face < GetNumberOfSides(part); face++) |
7970 | { | 7974 | { |
7971 | if (tex.GetFace((uint)face).TexMapType == MappingType.Planar) | 7975 | if (tex.GetFace((uint)face).TexMapType == MappingType.Planar) |
7972 | { | 7976 | { |
7973 | res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_PLANAR)); | 7977 | res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_PLANAR)); |
7974 | } | 7978 | } |
7975 | else | 7979 | else |
7976 | { | 7980 | { |
7977 | res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_DEFAULT)); | 7981 | res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_DEFAULT)); |
7978 | } | 7982 | } |
7979 | } | 7983 | } |
7980 | } | 7984 | } |
7981 | else | 7985 | else |
7982 | { | 7986 | { |
7983 | if (tex.GetFace((uint)face).TexMapType == MappingType.Planar) | 7987 | if (tex.GetFace((uint)face).TexMapType == MappingType.Planar) |
7984 | { | 7988 | { |
7985 | res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_PLANAR)); | 7989 | res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_PLANAR)); |
7986 | } | 7990 | } |
7987 | else | 7991 | else |
7988 | { | 7992 | { |
7989 | res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_DEFAULT)); | 7993 | res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_DEFAULT)); |
7990 | } | 7994 | } |
7991 | } | 7995 | } |
7992 | break; | 7996 | break; |
7993 | 7997 | ||
7994 | case (int)ScriptBaseClass.PRIM_POINT_LIGHT: | 7998 | case (int)ScriptBaseClass.PRIM_POINT_LIGHT: |
@@ -8006,26 +8010,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8006 | res.Add(new LSL_Float(shape.LightFalloff)); // falloff | 8010 | res.Add(new LSL_Float(shape.LightFalloff)); // falloff |
8007 | break; | 8011 | break; |
8008 | 8012 | ||
8009 | case (int)ScriptBaseClass.PRIM_GLOW: | 8013 | case (int)ScriptBaseClass.PRIM_GLOW: |
8010 | if (remain < 1) | 8014 | if (remain < 1) |
8011 | return res; | 8015 | return res; |
8012 | face = (int)rules.GetLSLIntegerItem(idx++); | 8016 | face = (int)rules.GetLSLIntegerItem(idx++); |
8013 | 8017 | ||
8014 | tex = part.Shape.Textures; | 8018 | tex = part.Shape.Textures; |
8015 | float primglow; | 8019 | float primglow; |
8016 | if (face == ScriptBaseClass.ALL_SIDES) | 8020 | if (face == ScriptBaseClass.ALL_SIDES) |
8017 | { | 8021 | { |
8018 | for (face = 0; face < GetNumberOfSides(part); face++) | 8022 | for (face = 0; face < GetNumberOfSides(part); face++) |
8019 | { | 8023 | { |
8020 | primglow = tex.GetFace((uint)face).Glow; | 8024 | primglow = tex.GetFace((uint)face).Glow; |
8021 | res.Add(new LSL_Float(primglow)); | 8025 | res.Add(new LSL_Float(primglow)); |
8022 | } | 8026 | } |
8023 | } | 8027 | } |
8024 | else | 8028 | else |
8025 | { | 8029 | { |
8026 | primglow = tex.GetFace((uint)face).Glow; | 8030 | primglow = tex.GetFace((uint)face).Glow; |
8027 | res.Add(new LSL_Float(primglow)); | 8031 | res.Add(new LSL_Float(primglow)); |
8028 | } | 8032 | } |
8029 | break; | 8033 | break; |
8030 | case (int)ScriptBaseClass.PRIM_TEXT: | 8034 | case (int)ScriptBaseClass.PRIM_TEXT: |
8031 | Color4 textColor = part.GetTextColor(); | 8035 | Color4 textColor = part.GetTextColor(); |
@@ -9187,7 +9191,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9187 | m_host.AddScriptLPS(1); | 9191 | m_host.AddScriptLPS(1); |
9188 | 9192 | ||
9189 | if (quick_pay_buttons.Data.Length < 4) | 9193 | if (quick_pay_buttons.Data.Length < 4) |
9190 | { | 9194 | { |
9191 | int x; | 9195 | int x; |
9192 | for (x=quick_pay_buttons.Data.Length; x<= 4; x++) | 9196 | for (x=quick_pay_buttons.Data.Length; x<= 4; x++) |
9193 | { | 9197 | { |
@@ -9195,12 +9199,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9195 | } | 9199 | } |
9196 | } | 9200 | } |
9197 | int[] nPrice = new int[5]; | 9201 | int[] nPrice = new int[5]; |
9198 | nPrice[0]=price; | 9202 | nPrice[0]=price; |
9199 | nPrice[1] = (LSL_Integer)quick_pay_buttons.Data[0]; | 9203 | nPrice[1] = (LSL_Integer)quick_pay_buttons.Data[0]; |
9200 | nPrice[2] = (LSL_Integer)quick_pay_buttons.Data[1]; | 9204 | nPrice[2] = (LSL_Integer)quick_pay_buttons.Data[1]; |
9201 | nPrice[3] = (LSL_Integer)quick_pay_buttons.Data[2]; | 9205 | nPrice[3] = (LSL_Integer)quick_pay_buttons.Data[2]; |
9202 | nPrice[4] = (LSL_Integer)quick_pay_buttons.Data[3]; | 9206 | nPrice[4] = (LSL_Integer)quick_pay_buttons.Data[3]; |
9203 | m_host.ParentGroup.RootPart.PayPrice = nPrice; | 9207 | m_host.ParentGroup.RootPart.PayPrice = nPrice; |
9204 | m_host.ParentGroup.HasGroupChanged = true; | 9208 | m_host.ParentGroup.HasGroupChanged = true; |
9205 | } | 9209 | } |
9206 | 9210 | ||
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(); |