diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 203 |
1 files changed, 104 insertions, 99 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 5552078..a90d20c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -77,14 +77,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
77 | protected float m_ScriptDistanceFactor = 1.0f; | 77 | protected float m_ScriptDistanceFactor = 1.0f; |
78 | protected float m_MinTimerInterval = 0.5f; | 78 | protected float m_MinTimerInterval = 0.5f; |
79 | 79 | ||
80 | private DateTime m_timer = DateTime.Now; | 80 | protected DateTime m_timer = DateTime.Now; |
81 | private bool m_waitingForScriptAnswer=false; | 81 | protected bool m_waitingForScriptAnswer=false; |
82 | private bool m_automaticLinkPermission=false; | 82 | protected bool m_automaticLinkPermission=false; |
83 | private IMessageTransferModule m_TransferModule = null; | 83 | protected IMessageTransferModule m_TransferModule = null; |
84 | private int m_notecardLineReadCharsMax = 255; | 84 | protected int m_notecardLineReadCharsMax = 255; |
85 | private IUrlModule m_UrlModule = null; | 85 | protected IUrlModule m_UrlModule = null; |
86 | |||
87 | //private static readonly ILog m_log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
88 | 86 | ||
89 | public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, UUID itemID) | 87 | public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, UUID itemID) |
90 | { | 88 | { |
@@ -130,7 +128,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
130 | return lease; | 128 | return lease; |
131 | } | 129 | } |
132 | 130 | ||
133 | protected void ScriptSleep(int delay) | 131 | protected virtual void ConditionalScriptSleep(int delay) |
132 | { | ||
133 | // Uncomment to get SL compatibility! | ||
134 | // | ||
135 | // ScriptSleep(delay); | ||
136 | } | ||
137 | |||
138 | protected virtual void ScriptSleep(int delay) | ||
134 | { | 139 | { |
135 | delay = (int)((float)delay * m_ScriptDelayFactor); | 140 | delay = (int)((float)delay * m_ScriptDelayFactor); |
136 | if (delay == 0) | 141 | if (delay == 0) |
@@ -208,7 +213,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
208 | } | 213 | } |
209 | } | 214 | } |
210 | 215 | ||
211 | private List<SceneObjectPart> GetLinkParts(int linkType) | 216 | protected List<SceneObjectPart> GetLinkParts(int linkType) |
212 | { | 217 | { |
213 | List<SceneObjectPart> ret = new List<SceneObjectPart>(); | 218 | List<SceneObjectPart> ret = new List<SceneObjectPart>(); |
214 | ret.Add(m_host); | 219 | ret.Add(m_host); |
@@ -261,7 +266,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
261 | } | 266 | } |
262 | } | 267 | } |
263 | 268 | ||
264 | private UUID InventorySelf() | 269 | protected UUID InventorySelf() |
265 | { | 270 | { |
266 | UUID invItemID = new UUID(); | 271 | UUID invItemID = new UUID(); |
267 | 272 | ||
@@ -280,7 +285,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
280 | return invItemID; | 285 | return invItemID; |
281 | } | 286 | } |
282 | 287 | ||
283 | private UUID InventoryKey(string name, int type) | 288 | protected UUID InventoryKey(string name, int type) |
284 | { | 289 | { |
285 | m_host.AddScriptLPS(1); | 290 | m_host.AddScriptLPS(1); |
286 | 291 | ||
@@ -301,7 +306,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
301 | return UUID.Zero; | 306 | return UUID.Zero; |
302 | } | 307 | } |
303 | 308 | ||
304 | private UUID InventoryKey(string name) | 309 | protected UUID InventoryKey(string name) |
305 | { | 310 | { |
306 | m_host.AddScriptLPS(1); | 311 | m_host.AddScriptLPS(1); |
307 | 312 | ||
@@ -327,7 +332,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
327 | /// </summary> | 332 | /// </summary> |
328 | /// <param name="k"></param> | 333 | /// <param name="k"></param> |
329 | /// <returns></returns> | 334 | /// <returns></returns> |
330 | private UUID KeyOrName(string k) | 335 | protected UUID KeyOrName(string k) |
331 | { | 336 | { |
332 | UUID key = UUID.Zero; | 337 | UUID key = UUID.Zero; |
333 | 338 | ||
@@ -345,7 +350,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
345 | } | 350 | } |
346 | 351 | ||
347 | // convert a LSL_Rotation to a Quaternion | 352 | // convert a LSL_Rotation to a Quaternion |
348 | private Quaternion Rot2Quaternion(LSL_Rotation r) | 353 | protected Quaternion Rot2Quaternion(LSL_Rotation r) |
349 | { | 354 | { |
350 | Quaternion q = new Quaternion((float)r.x, (float)r.y, (float)r.z, (float)r.s); | 355 | Quaternion q = new Quaternion((float)r.x, (float)r.y, (float)r.z, (float)r.s); |
351 | q.Normalize(); | 356 | q.Normalize(); |
@@ -465,7 +470,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
465 | // Utility function for llRot2Euler | 470 | // Utility function for llRot2Euler |
466 | 471 | ||
467 | // normalize an angle between -PI and PI (-180 to +180 degrees) | 472 | // normalize an angle between -PI and PI (-180 to +180 degrees) |
468 | private double NormalizeAngle(double angle) | 473 | protected double NormalizeAngle(double angle) |
469 | { | 474 | { |
470 | angle = angle % (Math.PI * 2); | 475 | angle = angle % (Math.PI * 2); |
471 | // if (angle < 0) angle = angle + Math.PI * 2; | 476 | // if (angle < 0) angle = angle + Math.PI * 2; |
@@ -1235,7 +1240,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1235 | SetScale(m_host, scale); | 1240 | SetScale(m_host, scale); |
1236 | } | 1241 | } |
1237 | 1242 | ||
1238 | private void SetScale(SceneObjectPart part, LSL_Vector scale) | 1243 | protected void SetScale(SceneObjectPart part, LSL_Vector scale) |
1239 | { | 1244 | { |
1240 | // TODO: this needs to trigger a persistance save as well | 1245 | // TODO: this needs to trigger a persistance save as well |
1241 | 1246 | ||
@@ -1290,7 +1295,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1290 | SetColor(m_host, color, face); | 1295 | SetColor(m_host, color, face); |
1291 | } | 1296 | } |
1292 | 1297 | ||
1293 | private void SetColor(SceneObjectPart part, LSL_Vector color, int face) | 1298 | protected void SetColor(SceneObjectPart part, LSL_Vector color, int face) |
1294 | { | 1299 | { |
1295 | Primitive.TextureEntry tex = part.Shape.Textures; | 1300 | Primitive.TextureEntry tex = part.Shape.Textures; |
1296 | Color4 texcolor; | 1301 | Color4 texcolor; |
@@ -1464,7 +1469,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1464 | return GetAlpha(m_host, face); | 1469 | return GetAlpha(m_host, face); |
1465 | } | 1470 | } |
1466 | 1471 | ||
1467 | private LSL_Float GetAlpha(SceneObjectPart part, int face) | 1472 | protected LSL_Float GetAlpha(SceneObjectPart part, int face) |
1468 | { | 1473 | { |
1469 | Primitive.TextureEntry tex = part.Shape.Textures; | 1474 | Primitive.TextureEntry tex = part.Shape.Textures; |
1470 | if (face == ScriptBaseClass.ALL_SIDES) | 1475 | if (face == ScriptBaseClass.ALL_SIDES) |
@@ -1499,7 +1504,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1499 | SetAlpha(part, alpha, face); | 1504 | SetAlpha(part, alpha, face); |
1500 | } | 1505 | } |
1501 | 1506 | ||
1502 | private void SetAlpha(SceneObjectPart part, double alpha, int face) | 1507 | protected void SetAlpha(SceneObjectPart part, double alpha, int face) |
1503 | { | 1508 | { |
1504 | Primitive.TextureEntry tex = part.Shape.Textures; | 1509 | Primitive.TextureEntry tex = part.Shape.Textures; |
1505 | Color4 texcolor; | 1510 | Color4 texcolor; |
@@ -1543,7 +1548,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1543 | /// <param name="wind"></param> | 1548 | /// <param name="wind"></param> |
1544 | /// <param name="tension"></param> | 1549 | /// <param name="tension"></param> |
1545 | /// <param name="Force"></param> | 1550 | /// <param name="Force"></param> |
1546 | private void SetFlexi(SceneObjectPart part, bool flexi, int softness, float gravity, float friction, | 1551 | protected void SetFlexi(SceneObjectPart part, bool flexi, int softness, float gravity, float friction, |
1547 | float wind, float tension, LSL_Vector Force) | 1552 | float wind, float tension, LSL_Vector Force) |
1548 | { | 1553 | { |
1549 | if (part == null) | 1554 | if (part == null) |
@@ -1579,7 +1584,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1579 | /// <param name="intensity"></param> | 1584 | /// <param name="intensity"></param> |
1580 | /// <param name="radius"></param> | 1585 | /// <param name="radius"></param> |
1581 | /// <param name="falloff"></param> | 1586 | /// <param name="falloff"></param> |
1582 | private void SetPointLight(SceneObjectPart part, bool light, LSL_Vector color, float intensity, float radius, float falloff) | 1587 | protected void SetPointLight(SceneObjectPart part, bool light, LSL_Vector color, float intensity, float radius, float falloff) |
1583 | { | 1588 | { |
1584 | if (part == null) | 1589 | if (part == null) |
1585 | return; | 1590 | return; |
@@ -1609,7 +1614,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1609 | return GetColor(m_host, face); | 1614 | return GetColor(m_host, face); |
1610 | } | 1615 | } |
1611 | 1616 | ||
1612 | private LSL_Vector GetColor(SceneObjectPart part, int face) | 1617 | protected LSL_Vector GetColor(SceneObjectPart part, int face) |
1613 | { | 1618 | { |
1614 | Primitive.TextureEntry tex = part.Shape.Textures; | 1619 | Primitive.TextureEntry tex = part.Shape.Textures; |
1615 | Color4 texcolor; | 1620 | Color4 texcolor; |
@@ -1650,7 +1655,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1650 | { | 1655 | { |
1651 | m_host.AddScriptLPS(1); | 1656 | m_host.AddScriptLPS(1); |
1652 | SetTexture(m_host, texture, face); | 1657 | SetTexture(m_host, texture, face); |
1653 | // ScriptSleep(200); | 1658 | ConditionalScriptSleep(200); |
1654 | } | 1659 | } |
1655 | 1660 | ||
1656 | public void llSetLinkTexture(int linknumber, string texture, int face) | 1661 | public void llSetLinkTexture(int linknumber, string texture, int face) |
@@ -1662,10 +1667,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1662 | foreach (SceneObjectPart part in parts) | 1667 | foreach (SceneObjectPart part in parts) |
1663 | SetTexture(part, texture, face); | 1668 | SetTexture(part, texture, face); |
1664 | 1669 | ||
1665 | // ScriptSleep(200); | 1670 | ConditionalScriptSleep(200); |
1666 | } | 1671 | } |
1667 | 1672 | ||
1668 | private void SetTexture(SceneObjectPart part, string texture, int face) | 1673 | protected void SetTexture(SceneObjectPart part, string texture, int face) |
1669 | { | 1674 | { |
1670 | UUID textureID=new UUID(); | 1675 | UUID textureID=new UUID(); |
1671 | 1676 | ||
@@ -1707,10 +1712,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1707 | m_host.AddScriptLPS(1); | 1712 | m_host.AddScriptLPS(1); |
1708 | 1713 | ||
1709 | ScaleTexture(m_host, u, v, face); | 1714 | ScaleTexture(m_host, u, v, face); |
1710 | // ScriptSleep(200); | 1715 | ConditionalScriptSleep(200); |
1711 | } | 1716 | } |
1712 | 1717 | ||
1713 | private void ScaleTexture(SceneObjectPart part, double u, double v, int face) | 1718 | protected void ScaleTexture(SceneObjectPart part, double u, double v, int face) |
1714 | { | 1719 | { |
1715 | Primitive.TextureEntry tex = part.Shape.Textures; | 1720 | Primitive.TextureEntry tex = part.Shape.Textures; |
1716 | if (face >= 0 && face < GetNumberOfSides(part)) | 1721 | if (face >= 0 && face < GetNumberOfSides(part)) |
@@ -1743,10 +1748,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1743 | { | 1748 | { |
1744 | m_host.AddScriptLPS(1); | 1749 | m_host.AddScriptLPS(1); |
1745 | OffsetTexture(m_host, u, v, face); | 1750 | OffsetTexture(m_host, u, v, face); |
1746 | // ScriptSleep(200); | 1751 | ConditionalScriptSleep(200); |
1747 | } | 1752 | } |
1748 | 1753 | ||
1749 | private void OffsetTexture(SceneObjectPart part, double u, double v, int face) | 1754 | protected void OffsetTexture(SceneObjectPart part, double u, double v, int face) |
1750 | { | 1755 | { |
1751 | Primitive.TextureEntry tex = part.Shape.Textures; | 1756 | Primitive.TextureEntry tex = part.Shape.Textures; |
1752 | if (face >= 0 && face < GetNumberOfSides(part)) | 1757 | if (face >= 0 && face < GetNumberOfSides(part)) |
@@ -1779,10 +1784,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1779 | { | 1784 | { |
1780 | m_host.AddScriptLPS(1); | 1785 | m_host.AddScriptLPS(1); |
1781 | RotateTexture(m_host, rotation, face); | 1786 | RotateTexture(m_host, rotation, face); |
1782 | // ScriptSleep(200); | 1787 | ConditionalScriptSleep(200); |
1783 | } | 1788 | } |
1784 | 1789 | ||
1785 | private void RotateTexture(SceneObjectPart part, double rotation, int face) | 1790 | protected void RotateTexture(SceneObjectPart part, double rotation, int face) |
1786 | { | 1791 | { |
1787 | Primitive.TextureEntry tex = part.Shape.Textures; | 1792 | Primitive.TextureEntry tex = part.Shape.Textures; |
1788 | if (face >= 0 && face < GetNumberOfSides(part)) | 1793 | if (face >= 0 && face < GetNumberOfSides(part)) |
@@ -1814,7 +1819,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1814 | return GetTexture(m_host, face); | 1819 | return GetTexture(m_host, face); |
1815 | } | 1820 | } |
1816 | 1821 | ||
1817 | private LSL_String GetTexture(SceneObjectPart part, int face) | 1822 | protected LSL_String GetTexture(SceneObjectPart part, int face) |
1818 | { | 1823 | { |
1819 | Primitive.TextureEntry tex = part.Shape.Textures; | 1824 | Primitive.TextureEntry tex = part.Shape.Textures; |
1820 | if (face == ScriptBaseClass.ALL_SIDES) | 1825 | if (face == ScriptBaseClass.ALL_SIDES) |
@@ -1842,7 +1847,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1842 | ScriptSleep(200); | 1847 | ScriptSleep(200); |
1843 | } | 1848 | } |
1844 | 1849 | ||
1845 | private void SetPos(SceneObjectPart part, LSL_Vector targetPos) | 1850 | protected void SetPos(SceneObjectPart part, LSL_Vector targetPos) |
1846 | { | 1851 | { |
1847 | // Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos) | 1852 | // Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos) |
1848 | LSL_Vector currentPos = llGetLocalPos(); | 1853 | LSL_Vector currentPos = llGetLocalPos(); |
@@ -1928,7 +1933,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1928 | ScriptSleep(200); | 1933 | ScriptSleep(200); |
1929 | } | 1934 | } |
1930 | 1935 | ||
1931 | private void SetRot(SceneObjectPart part, Quaternion rot) | 1936 | protected void SetRot(SceneObjectPart part, Quaternion rot) |
1932 | { | 1937 | { |
1933 | part.UpdateRotation(rot); | 1938 | part.UpdateRotation(rot); |
1934 | // Update rotation does not move the object in the physics scene if it's a linkset. | 1939 | // Update rotation does not move the object in the physics scene if it's a linkset. |
@@ -2208,7 +2213,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2208 | { | 2213 | { |
2209 | m_host.AddScriptLPS(1); | 2214 | m_host.AddScriptLPS(1); |
2210 | m_host.PreloadSound(sound); | 2215 | m_host.PreloadSound(sound); |
2211 | // ScriptSleep(1000); | 2216 | ConditionalScriptSleep(1000); |
2212 | } | 2217 | } |
2213 | 2218 | ||
2214 | /// <summary> | 2219 | /// <summary> |
@@ -2501,28 +2506,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2501 | { | 2506 | { |
2502 | m_host.AddScriptLPS(1); | 2507 | m_host.AddScriptLPS(1); |
2503 | Deprecated("llMakeExplosion"); | 2508 | Deprecated("llMakeExplosion"); |
2504 | // ScriptSleep(100); | 2509 | ConditionalScriptSleep(100); |
2505 | } | 2510 | } |
2506 | 2511 | ||
2507 | public void llMakeFountain(int particles, double scale, double vel, double lifetime, double arc, int bounce, string texture, LSL_Vector offset, double bounce_offset) | 2512 | public void llMakeFountain(int particles, double scale, double vel, double lifetime, double arc, int bounce, string texture, LSL_Vector offset, double bounce_offset) |
2508 | { | 2513 | { |
2509 | m_host.AddScriptLPS(1); | 2514 | m_host.AddScriptLPS(1); |
2510 | Deprecated("llMakeFountain"); | 2515 | Deprecated("llMakeFountain"); |
2511 | // ScriptSleep(100); | 2516 | ConditionalScriptSleep(100); |
2512 | } | 2517 | } |
2513 | 2518 | ||
2514 | public void llMakeSmoke(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) | 2519 | public void llMakeSmoke(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) |
2515 | { | 2520 | { |
2516 | m_host.AddScriptLPS(1); | 2521 | m_host.AddScriptLPS(1); |
2517 | Deprecated("llMakeSmoke"); | 2522 | Deprecated("llMakeSmoke"); |
2518 | // ScriptSleep(100); | 2523 | ConditionalScriptSleep(100); |
2519 | } | 2524 | } |
2520 | 2525 | ||
2521 | public void llMakeFire(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) | 2526 | public void llMakeFire(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) |
2522 | { | 2527 | { |
2523 | m_host.AddScriptLPS(1); | 2528 | m_host.AddScriptLPS(1); |
2524 | Deprecated("llMakeFire"); | 2529 | Deprecated("llMakeFire"); |
2525 | // ScriptSleep(100); | 2530 | ConditionalScriptSleep(100); |
2526 | } | 2531 | } |
2527 | 2532 | ||
2528 | public void llRezAtRoot(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param) | 2533 | public void llRezAtRoot(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param) |
@@ -2586,7 +2591,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2586 | } | 2591 | } |
2587 | // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay) | 2592 | // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay) |
2588 | ScriptSleep((int)((groupmass * velmag) / 10)); | 2593 | ScriptSleep((int)((groupmass * velmag) / 10)); |
2589 | // ScriptSleep(100); | 2594 | ConditionalScriptSleep(100); |
2590 | return; | 2595 | return; |
2591 | } | 2596 | } |
2592 | } | 2597 | } |
@@ -2642,7 +2647,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2642 | AsyncCommands.TimerPlugin.SetTimerEvent(m_localID, m_itemID, sec); | 2647 | AsyncCommands.TimerPlugin.SetTimerEvent(m_localID, m_itemID, sec); |
2643 | } | 2648 | } |
2644 | 2649 | ||
2645 | public void llSleep(double sec) | 2650 | public virtual void llSleep(double sec) |
2646 | { | 2651 | { |
2647 | m_host.AddScriptLPS(1); | 2652 | m_host.AddScriptLPS(1); |
2648 | Thread.Sleep((int)(sec * 1000)); | 2653 | Thread.Sleep((int)(sec * 1000)); |
@@ -2872,7 +2877,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2872 | } | 2877 | } |
2873 | 2878 | ||
2874 | emailModule.SendEmail(m_host.UUID, address, subject, message); | 2879 | emailModule.SendEmail(m_host.UUID, address, subject, message); |
2875 | // ScriptSleep(20000); | 2880 | ConditionalScriptSleep(20000); |
2876 | } | 2881 | } |
2877 | 2882 | ||
2878 | public void llGetNextEmail(string address, string subject) | 2883 | public void llGetNextEmail(string address, string subject) |
@@ -3676,7 +3681,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3676 | // destination is an object | 3681 | // destination is an object |
3677 | World.MoveTaskInventoryItem(destId, m_host, objId); | 3682 | World.MoveTaskInventoryItem(destId, m_host, objId); |
3678 | } | 3683 | } |
3679 | // ScriptSleep(3000); | 3684 | ConditionalScriptSleep(3000); |
3680 | } | 3685 | } |
3681 | 3686 | ||
3682 | public void llRemoveInventory(string name) | 3687 | public void llRemoveInventory(string name) |
@@ -3777,7 +3782,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3777 | AsyncCommands. | 3782 | AsyncCommands. |
3778 | DataserverPlugin.DataserverReply(rq.ToString(), reply); | 3783 | DataserverPlugin.DataserverReply(rq.ToString(), reply); |
3779 | 3784 | ||
3780 | // ScriptSleep(100); | 3785 | ConditionalScriptSleep(100); |
3781 | return tid.ToString(); | 3786 | return tid.ToString(); |
3782 | } | 3787 | } |
3783 | 3788 | ||
@@ -3815,11 +3820,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3815 | reply); | 3820 | reply); |
3816 | }); | 3821 | }); |
3817 | 3822 | ||
3818 | // ScriptSleep(1000); | 3823 | ConditionalScriptSleep(1000); |
3819 | return tid.ToString(); | 3824 | return tid.ToString(); |
3820 | } | 3825 | } |
3821 | } | 3826 | } |
3822 | // ScriptSleep(1000); | 3827 | ConditionalScriptSleep(1000); |
3823 | return String.Empty; | 3828 | return String.Empty; |
3824 | } | 3829 | } |
3825 | 3830 | ||
@@ -3848,7 +3853,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3848 | } | 3853 | } |
3849 | } | 3854 | } |
3850 | } | 3855 | } |
3851 | // ScriptSleep(5000); | 3856 | ConditionalScriptSleep(5000); |
3852 | } | 3857 | } |
3853 | 3858 | ||
3854 | public void llTextBox(string avatar, string message, int chat_channel) | 3859 | public void llTextBox(string avatar, string message, int chat_channel) |
@@ -4154,7 +4159,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4154 | // this function to understand which shape it is (taken from meshmerizer) | 4159 | // this function to understand which shape it is (taken from meshmerizer) |
4155 | // quite useful can be used by meshmerizer to have a centralized point of understanding the shape | 4160 | // quite useful can be used by meshmerizer to have a centralized point of understanding the shape |
4156 | // except that it refers to scripting constants | 4161 | // except that it refers to scripting constants |
4157 | private int getScriptPrimType(PrimitiveBaseShape primShape) | 4162 | protected int getScriptPrimType(PrimitiveBaseShape primShape) |
4158 | { | 4163 | { |
4159 | if (primShape.SculptEntry) | 4164 | if (primShape.SculptEntry) |
4160 | return ScriptBaseClass.PRIM_TYPE_SCULPT; | 4165 | return ScriptBaseClass.PRIM_TYPE_SCULPT; |
@@ -4189,7 +4194,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4189 | } | 4194 | } |
4190 | 4195 | ||
4191 | // Helper functions to understand if object has cut, hollow, dimple, and other affecting number of faces | 4196 | // Helper functions to understand if object has cut, hollow, dimple, and other affecting number of faces |
4192 | private void hasCutHollowDimpleProfileCut(int primType, PrimitiveBaseShape shape, out bool hasCut, out bool hasHollow, | 4197 | protected void hasCutHollowDimpleProfileCut(int primType, PrimitiveBaseShape shape, out bool hasCut, out bool hasHollow, |
4193 | out bool hasDimple, out bool hasProfileCut) | 4198 | out bool hasDimple, out bool hasProfileCut) |
4194 | { | 4199 | { |
4195 | if (primType == ScriptBaseClass.PRIM_TYPE_BOX | 4200 | if (primType == ScriptBaseClass.PRIM_TYPE_BOX |
@@ -4215,7 +4220,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4215 | return GetNumberOfSides(m_host); | 4220 | return GetNumberOfSides(m_host); |
4216 | } | 4221 | } |
4217 | 4222 | ||
4218 | private int GetNumberOfSides(SceneObjectPart part) | 4223 | protected int GetNumberOfSides(SceneObjectPart part) |
4219 | { | 4224 | { |
4220 | int ret = 0; | 4225 | int ret = 0; |
4221 | bool hasCut; | 4226 | bool hasCut; |
@@ -4461,7 +4466,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4461 | return GetTextureOffset(m_host, face); | 4466 | return GetTextureOffset(m_host, face); |
4462 | } | 4467 | } |
4463 | 4468 | ||
4464 | private LSL_Vector GetTextureOffset(SceneObjectPart part, int face) | 4469 | protected LSL_Vector GetTextureOffset(SceneObjectPart part, int face) |
4465 | { | 4470 | { |
4466 | Primitive.TextureEntry tex = part.Shape.Textures; | 4471 | Primitive.TextureEntry tex = part.Shape.Textures; |
4467 | LSL_Vector offset = new LSL_Vector(); | 4472 | LSL_Vector offset = new LSL_Vector(); |
@@ -4503,7 +4508,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4503 | return GetTextureRot(m_host, face); | 4508 | return GetTextureRot(m_host, face); |
4504 | } | 4509 | } |
4505 | 4510 | ||
4506 | private LSL_Float GetTextureRot(SceneObjectPart part, int face) | 4511 | protected LSL_Float GetTextureRot(SceneObjectPart part, int face) |
4507 | { | 4512 | { |
4508 | Primitive.TextureEntry tex = part.Shape.Textures; | 4513 | Primitive.TextureEntry tex = part.Shape.Textures; |
4509 | if (face == -1) | 4514 | if (face == -1) |
@@ -5299,7 +5304,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5299 | { | 5304 | { |
5300 | m_host.AddScriptLPS(1); | 5305 | m_host.AddScriptLPS(1); |
5301 | m_host.AdjustSoundGain(volume); | 5306 | m_host.AdjustSoundGain(volume); |
5302 | // ScriptSleep(100); | 5307 | ConditionalScriptSleep(100); |
5303 | } | 5308 | } |
5304 | 5309 | ||
5305 | public void llSetSoundQueueing(int queue) | 5310 | public void llSetSoundQueueing(int queue) |
@@ -5383,7 +5388,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5383 | World.TeleportClientHome(agentId, presence.ControllingClient); | 5388 | World.TeleportClientHome(agentId, presence.ControllingClient); |
5384 | } | 5389 | } |
5385 | } | 5390 | } |
5386 | // ScriptSleep(5000); | 5391 | ConditionalScriptSleep(5000); |
5387 | } | 5392 | } |
5388 | 5393 | ||
5389 | public LSL_List llParseString2List(string str, LSL_List separators, LSL_List in_spacers) | 5394 | public LSL_List llParseString2List(string str, LSL_List separators, LSL_List in_spacers) |
@@ -5733,7 +5738,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5733 | return returnval; | 5738 | return returnval; |
5734 | } | 5739 | } |
5735 | 5740 | ||
5736 | private Primitive.ParticleSystem getNewParticleSystemWithSLDefaultValues() | 5741 | protected Primitive.ParticleSystem getNewParticleSystemWithSLDefaultValues() |
5737 | { | 5742 | { |
5738 | Primitive.ParticleSystem ps = new Primitive.ParticleSystem(); | 5743 | Primitive.ParticleSystem ps = new Primitive.ParticleSystem(); |
5739 | 5744 | ||
@@ -5906,7 +5911,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5906 | NotImplemented("llGroundRepel"); | 5911 | NotImplemented("llGroundRepel"); |
5907 | } | 5912 | } |
5908 | 5913 | ||
5909 | private UUID GetTaskInventoryItem(string name) | 5914 | protected UUID GetTaskInventoryItem(string name) |
5910 | { | 5915 | { |
5911 | lock (m_host.TaskInventory) | 5916 | lock (m_host.TaskInventory) |
5912 | { | 5917 | { |
@@ -6075,7 +6080,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6075 | land.ParcelAccessList.Add(entry); | 6080 | land.ParcelAccessList.Add(entry); |
6076 | } | 6081 | } |
6077 | } | 6082 | } |
6078 | // ScriptSleep(100); | 6083 | ConditionalScriptSleep(100); |
6079 | } | 6084 | } |
6080 | 6085 | ||
6081 | public void llSetTouchText(string text) | 6086 | public void llSetTouchText(string text) |
@@ -6172,7 +6177,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6172 | av, m_host.Name, m_host.UUID, m_host.OwnerID, | 6177 | av, m_host.Name, m_host.UUID, m_host.OwnerID, |
6173 | message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts); | 6178 | message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts); |
6174 | 6179 | ||
6175 | // ScriptSleep(1000); | 6180 | ConditionalScriptSleep(1000); |
6176 | } | 6181 | } |
6177 | 6182 | ||
6178 | public void llVolumeDetect(int detect) | 6183 | public void llVolumeDetect(int detect) |
@@ -6197,7 +6202,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6197 | m_host.AddScriptLPS(1); | 6202 | m_host.AddScriptLPS(1); |
6198 | // Report an error as it does in SL | 6203 | // Report an error as it does in SL |
6199 | ShoutError("Deprecated. Please use llRemoteLoadScriptPin instead."); | 6204 | ShoutError("Deprecated. Please use llRemoteLoadScriptPin instead."); |
6200 | // ScriptSleep(3000); | 6205 | ConditionalScriptSleep(3000); |
6201 | } | 6206 | } |
6202 | 6207 | ||
6203 | public void llSetRemoteScriptAccessPin(int pin) | 6208 | public void llSetRemoteScriptAccessPin(int pin) |
@@ -6270,14 +6275,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6270 | "remote_data", resobj, | 6275 | "remote_data", resobj, |
6271 | new DetectParams[0])); | 6276 | new DetectParams[0])); |
6272 | } | 6277 | } |
6273 | // ScriptSleep(1000); | 6278 | ConditionalScriptSleep(1000); |
6274 | } | 6279 | } |
6275 | 6280 | ||
6276 | public LSL_String llSendRemoteData(string channel, string dest, int idata, string sdata) | 6281 | public LSL_String llSendRemoteData(string channel, string dest, int idata, string sdata) |
6277 | { | 6282 | { |
6278 | m_host.AddScriptLPS(1); | 6283 | m_host.AddScriptLPS(1); |
6279 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); | 6284 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); |
6280 | // ScriptSleep(3000); | 6285 | ConditionalScriptSleep(3000); |
6281 | return (xmlrpcMod.SendRemoteData(m_localID, m_itemID, channel, dest, idata, sdata)).ToString(); | 6286 | return (xmlrpcMod.SendRemoteData(m_localID, m_itemID, channel, dest, idata, sdata)).ToString(); |
6282 | } | 6287 | } |
6283 | 6288 | ||
@@ -6286,7 +6291,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6286 | m_host.AddScriptLPS(1); | 6291 | m_host.AddScriptLPS(1); |
6287 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); | 6292 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); |
6288 | xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata); | 6293 | xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata); |
6289 | // ScriptSleep(3000); | 6294 | ConditionalScriptSleep(3000); |
6290 | } | 6295 | } |
6291 | 6296 | ||
6292 | public void llCloseRemoteDataChannel(string channel) | 6297 | public void llCloseRemoteDataChannel(string channel) |
@@ -6294,7 +6299,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6294 | m_host.AddScriptLPS(1); | 6299 | m_host.AddScriptLPS(1); |
6295 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); | 6300 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); |
6296 | xmlrpcMod.CloseXMLRPCChannel((UUID)channel); | 6301 | xmlrpcMod.CloseXMLRPCChannel((UUID)channel); |
6297 | // ScriptSleep(1000); | 6302 | ConditionalScriptSleep(1000); |
6298 | } | 6303 | } |
6299 | 6304 | ||
6300 | public LSL_String llMD5String(string src, int nonce) | 6305 | public LSL_String llMD5String(string src, int nonce) |
@@ -6309,7 +6314,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6309 | return Util.SHA1Hash(src).ToLower(); | 6314 | return Util.SHA1Hash(src).ToLower(); |
6310 | } | 6315 | } |
6311 | 6316 | ||
6312 | private ObjectShapePacket.ObjectDataBlock SetPrimitiveBlockShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist) | 6317 | protected ObjectShapePacket.ObjectDataBlock SetPrimitiveBlockShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist) |
6313 | { | 6318 | { |
6314 | ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); | 6319 | ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); |
6315 | 6320 | ||
@@ -6379,7 +6384,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6379 | return shapeBlock; | 6384 | return shapeBlock; |
6380 | } | 6385 | } |
6381 | 6386 | ||
6382 | private void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector taper_b, LSL_Vector topshear, byte fudge) | 6387 | protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector taper_b, LSL_Vector topshear, byte fudge) |
6383 | { | 6388 | { |
6384 | ObjectShapePacket.ObjectDataBlock shapeBlock; | 6389 | ObjectShapePacket.ObjectDataBlock shapeBlock; |
6385 | 6390 | ||
@@ -6427,7 +6432,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6427 | part.UpdateShape(shapeBlock); | 6432 | part.UpdateShape(shapeBlock); |
6428 | } | 6433 | } |
6429 | 6434 | ||
6430 | private void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector dimple, byte fudge) | 6435 | protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector dimple, byte fudge) |
6431 | { | 6436 | { |
6432 | ObjectShapePacket.ObjectDataBlock shapeBlock; | 6437 | ObjectShapePacket.ObjectDataBlock shapeBlock; |
6433 | 6438 | ||
@@ -6468,7 +6473,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6468 | part.UpdateShape(shapeBlock); | 6473 | part.UpdateShape(shapeBlock); |
6469 | } | 6474 | } |
6470 | 6475 | ||
6471 | private 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) | 6476 | 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) |
6472 | { | 6477 | { |
6473 | ObjectShapePacket.ObjectDataBlock shapeBlock; | 6478 | ObjectShapePacket.ObjectDataBlock shapeBlock; |
6474 | 6479 | ||
@@ -6588,7 +6593,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6588 | part.UpdateShape(shapeBlock); | 6593 | part.UpdateShape(shapeBlock); |
6589 | } | 6594 | } |
6590 | 6595 | ||
6591 | private void SetPrimitiveShapeParams(SceneObjectPart part, string map, int type) | 6596 | protected void SetPrimitiveShapeParams(SceneObjectPart part, string map, int type) |
6592 | { | 6597 | { |
6593 | ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); | 6598 | ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); |
6594 | UUID sculptId; | 6599 | UUID sculptId; |
@@ -6638,7 +6643,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6638 | SetPrimParams(part, rules); | 6643 | SetPrimParams(part, rules); |
6639 | } | 6644 | } |
6640 | 6645 | ||
6641 | private void SetPrimParams(SceneObjectPart part, LSL_List rules) | 6646 | protected void SetPrimParams(SceneObjectPart part, LSL_List rules) |
6642 | { | 6647 | { |
6643 | int idx = 0; | 6648 | int idx = 0; |
6644 | 6649 | ||
@@ -7019,7 +7024,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7019 | { | 7024 | { |
7020 | m_host.AddScriptLPS(1); | 7025 | m_host.AddScriptLPS(1); |
7021 | Deprecated("llXorBase64Strings"); | 7026 | Deprecated("llXorBase64Strings"); |
7022 | // ScriptSleep(300); | 7027 | ConditionalScriptSleep(300); |
7023 | return String.Empty; | 7028 | return String.Empty; |
7024 | } | 7029 | } |
7025 | 7030 | ||
@@ -7067,7 +7072,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7067 | 7072 | ||
7068 | land.SetMusicUrl(url); | 7073 | land.SetMusicUrl(url); |
7069 | 7074 | ||
7070 | // ScriptSleep(2000); | 7075 | ConditionalScriptSleep(2000); |
7071 | } | 7076 | } |
7072 | 7077 | ||
7073 | public LSL_Vector llGetRootPosition() | 7078 | public LSL_Vector llGetRootPosition() |
@@ -7553,7 +7558,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7553 | // base-64 characters | 7558 | // base-64 characters |
7554 | // </summary> | 7559 | // </summary> |
7555 | 7560 | ||
7556 | private static readonly char[] i2ctable = | 7561 | protected static readonly char[] i2ctable = |
7557 | { | 7562 | { |
7558 | 'A','B','C','D','E','F','G','H', | 7563 | 'A','B','C','D','E','F','G','H', |
7559 | 'I','J','K','L','M','N','O','P', | 7564 | 'I','J','K','L','M','N','O','P', |
@@ -7573,7 +7578,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7573 | // into 6-bit integers. | 7578 | // into 6-bit integers. |
7574 | // </summary> | 7579 | // </summary> |
7575 | 7580 | ||
7576 | private static readonly int[] c2itable = | 7581 | protected static readonly int[] c2itable = |
7577 | { | 7582 | { |
7578 | -1,-1,-1,-1,-1,-1,-1,-1, // 0x | 7583 | -1,-1,-1,-1,-1,-1,-1,-1, // 0x |
7579 | -1,-1,-1,-1,-1,-1,-1,-1, | 7584 | -1,-1,-1,-1,-1,-1,-1,-1, |
@@ -8104,7 +8109,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8104 | case 5: // DATA_SIM_POS | 8109 | case 5: // DATA_SIM_POS |
8105 | if (info == null) | 8110 | if (info == null) |
8106 | { | 8111 | { |
8107 | // ScriptSleep(1000); | 8112 | ConditionalScriptSleep(1000); |
8108 | return UUID.Zero.ToString(); | 8113 | return UUID.Zero.ToString(); |
8109 | } | 8114 | } |
8110 | reply = new LSL_Vector( | 8115 | reply = new LSL_Vector( |
@@ -8121,7 +8126,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8121 | case 7: // DATA_SIM_RATING | 8126 | case 7: // DATA_SIM_RATING |
8122 | if (info == null) | 8127 | if (info == null) |
8123 | { | 8128 | { |
8124 | // ScriptSleep(1000); | 8129 | ConditionalScriptSleep(1000); |
8125 | return UUID.Zero.ToString(); | 8130 | return UUID.Zero.ToString(); |
8126 | } | 8131 | } |
8127 | int access = info.RegionSettings.Maturity; | 8132 | int access = info.RegionSettings.Maturity; |
@@ -8140,7 +8145,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8140 | reply = "OpenSim"; | 8145 | reply = "OpenSim"; |
8141 | break; | 8146 | break; |
8142 | default: | 8147 | default: |
8143 | // ScriptSleep(1000); | 8148 | ConditionalScriptSleep(1000); |
8144 | return UUID.Zero.ToString(); // Raise no event | 8149 | return UUID.Zero.ToString(); // Raise no event |
8145 | } | 8150 | } |
8146 | UUID rq = UUID.Random(); | 8151 | UUID rq = UUID.Random(); |
@@ -8151,7 +8156,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8151 | AsyncCommands. | 8156 | AsyncCommands. |
8152 | DataserverPlugin.DataserverReply(rq.ToString(), reply); | 8157 | DataserverPlugin.DataserverReply(rq.ToString(), reply); |
8153 | 8158 | ||
8154 | // ScriptSleep(1000); | 8159 | ConditionalScriptSleep(1000); |
8155 | return tid.ToString(); | 8160 | return tid.ToString(); |
8156 | } | 8161 | } |
8157 | catch(Exception) | 8162 | catch(Exception) |
@@ -8295,7 +8300,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8295 | dm.SendUrlToUser( | 8300 | dm.SendUrlToUser( |
8296 | new UUID(avatar_id), m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message, url); | 8301 | new UUID(avatar_id), m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message, url); |
8297 | 8302 | ||
8298 | // ScriptSleep(10000); | 8303 | ConditionalScriptSleep(10000); |
8299 | } | 8304 | } |
8300 | 8305 | ||
8301 | public void llParcelMediaCommandList(LSL_List commandList) | 8306 | public void llParcelMediaCommandList(LSL_List commandList) |
@@ -8531,7 +8536,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8531 | time); | 8536 | time); |
8532 | } | 8537 | } |
8533 | } | 8538 | } |
8534 | // ScriptSleep(2000); | 8539 | ConditionalScriptSleep(2000); |
8535 | } | 8540 | } |
8536 | 8541 | ||
8537 | public LSL_List llParcelMediaQuery(LSL_List aList) | 8542 | public LSL_List llParcelMediaQuery(LSL_List aList) |
@@ -8569,7 +8574,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8569 | 8574 | ||
8570 | } | 8575 | } |
8571 | } | 8576 | } |
8572 | // ScriptSleep(2000); | 8577 | ConditionalScriptSleep(2000); |
8573 | return list; | 8578 | return list; |
8574 | } | 8579 | } |
8575 | 8580 | ||
@@ -8578,7 +8583,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8578 | m_host.AddScriptLPS(1); | 8583 | m_host.AddScriptLPS(1); |
8579 | Int64 tmp = 0; | 8584 | Int64 tmp = 0; |
8580 | Math.DivRem(Convert.ToInt64(Math.Pow(a, b)), c, out tmp); | 8585 | Math.DivRem(Convert.ToInt64(Math.Pow(a, b)), c, out tmp); |
8581 | // ScriptSleep(1000); | 8586 | ConditionalScriptSleep(1000); |
8582 | return Convert.ToInt32(tmp); | 8587 | return Convert.ToInt32(tmp); |
8583 | } | 8588 | } |
8584 | 8589 | ||
@@ -8682,7 +8687,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8682 | public void llSetPrimURL(string url) | 8687 | public void llSetPrimURL(string url) |
8683 | { | 8688 | { |
8684 | m_host.AddScriptLPS(1); | 8689 | m_host.AddScriptLPS(1); |
8685 | // ScriptSleep(2000); | 8690 | ConditionalScriptSleep(2000); |
8686 | } | 8691 | } |
8687 | 8692 | ||
8688 | /// <summary> | 8693 | /// <summary> |
@@ -8693,7 +8698,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8693 | { | 8698 | { |
8694 | m_host.AddScriptLPS(1); | 8699 | m_host.AddScriptLPS(1); |
8695 | ShoutError("llRefreshPrimURL - not yet supported"); | 8700 | ShoutError("llRefreshPrimURL - not yet supported"); |
8696 | // ScriptSleep(20000); | 8701 | ConditionalScriptSleep(20000); |
8697 | } | 8702 | } |
8698 | 8703 | ||
8699 | public LSL_String llEscapeURL(string url) | 8704 | public LSL_String llEscapeURL(string url) |
@@ -8735,7 +8740,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8735 | new Vector3((float)pos.x, (float)pos.y, (float)pos.z), | 8740 | new Vector3((float)pos.x, (float)pos.y, (float)pos.z), |
8736 | new Vector3((float)lookAt.x, (float)lookAt.y, (float)lookAt.z)); | 8741 | new Vector3((float)lookAt.x, (float)lookAt.y, (float)lookAt.z)); |
8737 | } | 8742 | } |
8738 | // ScriptSleep(1000); | 8743 | ConditionalScriptSleep(1000); |
8739 | } | 8744 | } |
8740 | 8745 | ||
8741 | public void llAddToLandBanList(string avatar, double hours) | 8746 | public void llAddToLandBanList(string avatar, double hours) |
@@ -8754,7 +8759,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8754 | land.ParcelAccessList.Add(entry); | 8759 | land.ParcelAccessList.Add(entry); |
8755 | } | 8760 | } |
8756 | } | 8761 | } |
8757 | // ScriptSleep(100); | 8762 | ConditionalScriptSleep(100); |
8758 | } | 8763 | } |
8759 | 8764 | ||
8760 | public void llRemoveFromLandPassList(string avatar) | 8765 | public void llRemoveFromLandPassList(string avatar) |
@@ -8776,7 +8781,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8776 | } | 8781 | } |
8777 | } | 8782 | } |
8778 | } | 8783 | } |
8779 | // ScriptSleep(100); | 8784 | ConditionalScriptSleep(100); |
8780 | } | 8785 | } |
8781 | 8786 | ||
8782 | public void llRemoveFromLandBanList(string avatar) | 8787 | public void llRemoveFromLandBanList(string avatar) |
@@ -8798,7 +8803,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8798 | } | 8803 | } |
8799 | } | 8804 | } |
8800 | } | 8805 | } |
8801 | // ScriptSleep(100); | 8806 | ConditionalScriptSleep(100); |
8802 | } | 8807 | } |
8803 | 8808 | ||
8804 | public void llSetCameraParams(LSL_List rules) | 8809 | public void llSetCameraParams(LSL_List rules) |
@@ -9044,7 +9049,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9044 | } | 9049 | } |
9045 | } | 9050 | } |
9046 | } | 9051 | } |
9047 | // ScriptSleep(100); | 9052 | ConditionalScriptSleep(100); |
9048 | } | 9053 | } |
9049 | 9054 | ||
9050 | public void llResetLandPassList() | 9055 | public void llResetLandPassList() |
@@ -9061,7 +9066,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9061 | } | 9066 | } |
9062 | } | 9067 | } |
9063 | } | 9068 | } |
9064 | // ScriptSleep(100); | 9069 | ConditionalScriptSleep(100); |
9065 | } | 9070 | } |
9066 | 9071 | ||
9067 | public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide) | 9072 | public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide) |
@@ -9140,7 +9145,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9140 | ret.Add(detectedParams.Value); | 9145 | ret.Add(detectedParams.Value); |
9141 | } | 9146 | } |
9142 | } | 9147 | } |
9143 | // ScriptSleep(2000); | 9148 | ConditionalScriptSleep(2000); |
9144 | return ret; | 9149 | return ret; |
9145 | } | 9150 | } |
9146 | 9151 | ||
@@ -9351,7 +9356,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9351 | } | 9356 | } |
9352 | 9357 | ||
9353 | public delegate void AssetRequestCallback(UUID assetID, AssetBase asset); | 9358 | public delegate void AssetRequestCallback(UUID assetID, AssetBase asset); |
9354 | private void WithNotecard(UUID assetID, AssetRequestCallback cb) | 9359 | protected void WithNotecard(UUID assetID, AssetRequestCallback cb) |
9355 | { | 9360 | { |
9356 | World.AssetService.Get(assetID.ToString(), this, | 9361 | World.AssetService.Get(assetID.ToString(), this, |
9357 | delegate(string i, object sender, AssetBase a) | 9362 | delegate(string i, object sender, AssetBase a) |
@@ -9398,7 +9403,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9398 | AsyncCommands. | 9403 | AsyncCommands. |
9399 | DataserverPlugin.DataserverReply(assetID.ToString(), | 9404 | DataserverPlugin.DataserverReply(assetID.ToString(), |
9400 | NotecardCache.GetLines(assetID).ToString()); | 9405 | NotecardCache.GetLines(assetID).ToString()); |
9401 | // ScriptSleep(100); | 9406 | ConditionalScriptSleep(100); |
9402 | return tid.ToString(); | 9407 | return tid.ToString(); |
9403 | } | 9408 | } |
9404 | 9409 | ||
@@ -9420,7 +9425,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9420 | NotecardCache.GetLines(id).ToString()); | 9425 | NotecardCache.GetLines(id).ToString()); |
9421 | }); | 9426 | }); |
9422 | 9427 | ||
9423 | // ScriptSleep(100); | 9428 | ConditionalScriptSleep(100); |
9424 | return tid.ToString(); | 9429 | return tid.ToString(); |
9425 | } | 9430 | } |
9426 | 9431 | ||
@@ -9460,7 +9465,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9460 | AsyncCommands. | 9465 | AsyncCommands. |
9461 | DataserverPlugin.DataserverReply(assetID.ToString(), | 9466 | DataserverPlugin.DataserverReply(assetID.ToString(), |
9462 | NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax)); | 9467 | NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax)); |
9463 | // ScriptSleep(100); | 9468 | ConditionalScriptSleep(100); |
9464 | return tid.ToString(); | 9469 | return tid.ToString(); |
9465 | } | 9470 | } |
9466 | 9471 | ||
@@ -9482,7 +9487,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9482 | NotecardCache.GetLine(id, line, m_notecardLineReadCharsMax)); | 9487 | NotecardCache.GetLine(id, line, m_notecardLineReadCharsMax)); |
9483 | }); | 9488 | }); |
9484 | 9489 | ||
9485 | // ScriptSleep(100); | 9490 | ConditionalScriptSleep(100); |
9486 | return tid.ToString(); | 9491 | return tid.ToString(); |
9487 | } | 9492 | } |
9488 | 9493 | ||
@@ -9490,13 +9495,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9490 | 9495 | ||
9491 | public class NotecardCache | 9496 | public class NotecardCache |
9492 | { | 9497 | { |
9493 | private class Notecard | 9498 | protected class Notecard |
9494 | { | 9499 | { |
9495 | public string[] text; | 9500 | public string[] text; |
9496 | public DateTime lastRef; | 9501 | public DateTime lastRef; |
9497 | } | 9502 | } |
9498 | 9503 | ||
9499 | private static Dictionary<UUID, Notecard> m_Notecards = | 9504 | protected static Dictionary<UUID, Notecard> m_Notecards = |
9500 | new Dictionary<UUID, Notecard>(); | 9505 | new Dictionary<UUID, Notecard>(); |
9501 | 9506 | ||
9502 | public static void Cache(UUID assetID, string text) | 9507 | public static void Cache(UUID assetID, string text) |
@@ -9515,7 +9520,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9515 | } | 9520 | } |
9516 | } | 9521 | } |
9517 | 9522 | ||
9518 | private static string[] ParseText(string[] input) | 9523 | protected static string[] ParseText(string[] input) |
9519 | { | 9524 | { |
9520 | int idx = 0; | 9525 | int idx = 0; |
9521 | int level = 0; | 9526 | int level = 0; |