diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
8 files changed, 165 insertions, 120 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs index 3120d04..a6a2dd8 100644..100755 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs | |||
@@ -221,7 +221,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
221 | /// </summary> | 221 | /// </summary> |
222 | private static void CmdHandlerThreadLoop() | 222 | private static void CmdHandlerThreadLoop() |
223 | { | 223 | { |
224 | while (true) | 224 | bool running = true; |
225 | while (running) | ||
225 | { | 226 | { |
226 | try | 227 | try |
227 | { | 228 | { |
@@ -230,7 +231,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
230 | DoOneCmdHandlerPass(); | 231 | DoOneCmdHandlerPass(); |
231 | Watchdog.UpdateThread(); | 232 | Watchdog.UpdateThread(); |
232 | } | 233 | } |
233 | catch ( System.Threading.ThreadAbortException) { } | 234 | catch ( System.Threading.ThreadAbortException) |
235 | { | ||
236 | Thread.ResetAbort(); | ||
237 | running = false; | ||
238 | } | ||
234 | catch (Exception e) | 239 | catch (Exception e) |
235 | { | 240 | { |
236 | m_log.Error("[ASYNC COMMAND MANAGER]: Exception in command handler pass: ", e); | 241 | m_log.Error("[ASYNC COMMAND MANAGER]: Exception in command handler pass: ", e); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 943141c..ab3562f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -1936,45 +1936,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1936 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1936 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1937 | return; | 1937 | return; |
1938 | 1938 | ||
1939 | Primitive.TextureEntry tex = part.Shape.Textures; | ||
1940 | int nsides = GetNumberOfSides(part); | ||
1941 | Color4 texcolor; | ||
1942 | |||
1943 | if (face >= 0 && face < nsides) | ||
1944 | { | ||
1945 | texcolor = tex.CreateFace((uint)face).RGBA; | ||
1946 | texcolor.R = Util.Clip((float)color.x, 0.0f, 1.0f); | ||
1947 | texcolor.G = Util.Clip((float)color.y, 0.0f, 1.0f); | ||
1948 | texcolor.B = Util.Clip((float)color.z, 0.0f, 1.0f); | ||
1949 | tex.FaceTextures[face].RGBA = texcolor; | ||
1950 | part.UpdateTextureEntry(tex); | ||
1951 | return; | ||
1952 | } | ||
1953 | else if (face == ScriptBaseClass.ALL_SIDES) | ||
1954 | { | ||
1955 | for (uint i = 0; i < nsides; i++) | ||
1956 | { | ||
1957 | if (tex.FaceTextures[i] != null) | ||
1958 | { | ||
1959 | texcolor = tex.FaceTextures[i].RGBA; | ||
1960 | texcolor.R = Util.Clip((float)color.x, 0.0f, 1.0f); | ||
1961 | texcolor.G = Util.Clip((float)color.y, 0.0f, 1.0f); | ||
1962 | texcolor.B = Util.Clip((float)color.z, 0.0f, 1.0f); | ||
1963 | tex.FaceTextures[i].RGBA = texcolor; | ||
1964 | } | ||
1965 | texcolor = tex.DefaultTexture.RGBA; | ||
1966 | texcolor.R = Util.Clip((float)color.x, 0.0f, 1.0f); | ||
1967 | texcolor.G = Util.Clip((float)color.y, 0.0f, 1.0f); | ||
1968 | texcolor.B = Util.Clip((float)color.z, 0.0f, 1.0f); | ||
1969 | tex.DefaultTexture.RGBA = texcolor; | ||
1970 | } | ||
1971 | part.UpdateTextureEntry(tex); | ||
1972 | return; | ||
1973 | } | ||
1974 | |||
1975 | if (face == ScriptBaseClass.ALL_SIDES) | ||
1976 | face = SceneObjectPart.ALL_SIDES; | ||
1977 | |||
1978 | m_host.SetFaceColorAlpha(face, color, null); | 1939 | m_host.SetFaceColorAlpha(face, color, null); |
1979 | } | 1940 | } |
1980 | 1941 | ||
@@ -3577,7 +3538,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3577 | public void doObjectRez(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param, bool atRoot) | 3538 | public void doObjectRez(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param, bool atRoot) |
3578 | { | 3539 | { |
3579 | m_host.AddScriptLPS(1); | 3540 | m_host.AddScriptLPS(1); |
3580 | if (Double.IsNaN(rot.x) || Double.IsNaN(rot.y) || Double.IsNaN(rot.z) || Double.IsNaN(rot.s)) | 3541 | if (string.IsNullOrEmpty(inventory) || Double.IsNaN(rot.x) || Double.IsNaN(rot.y) || Double.IsNaN(rot.z) || Double.IsNaN(rot.s)) |
3581 | return; | 3542 | return; |
3582 | 3543 | ||
3583 | float dist = (float)llVecDist(llGetPos(), pos); | 3544 | float dist = (float)llVecDist(llGetPos(), pos); |
@@ -10653,7 +10614,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10653 | return false; | 10614 | return false; |
10654 | 10615 | ||
10655 | texface.MaterialID = id; | 10616 | texface.MaterialID = id; |
10656 | part.Shape.TextureEntry = tex.GetBytes(); | 10617 | part.Shape.TextureEntry = tex.GetBytes(9); |
10657 | m_materialsModule.RemoveMaterial(oldid); | 10618 | m_materialsModule.RemoveMaterial(oldid); |
10658 | return true; | 10619 | return true; |
10659 | } | 10620 | } |
@@ -10710,7 +10671,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10710 | return false; | 10671 | return false; |
10711 | 10672 | ||
10712 | texface.MaterialID = id; | 10673 | texface.MaterialID = id; |
10713 | part.Shape.TextureEntry = tex.GetBytes(); | 10674 | part.Shape.TextureEntry = tex.GetBytes(9); |
10714 | m_materialsModule.RemoveMaterial(oldid); | 10675 | m_materialsModule.RemoveMaterial(oldid); |
10715 | return true; | 10676 | return true; |
10716 | } | 10677 | } |
@@ -10777,7 +10738,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10777 | return false; | 10738 | return false; |
10778 | 10739 | ||
10779 | texface.MaterialID = id; | 10740 | texface.MaterialID = id; |
10780 | part.Shape.TextureEntry = tex.GetBytes(); | 10741 | part.Shape.TextureEntry = tex.GetBytes(9); |
10781 | m_materialsModule.RemoveMaterial(oldid); | 10742 | m_materialsModule.RemoveMaterial(oldid); |
10782 | return true; | 10743 | return true; |
10783 | } | 10744 | } |
@@ -13945,14 +13906,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13945 | 13906 | ||
13946 | public LSL_Key llHTTPRequest(string url, LSL_List parameters, string body) | 13907 | public LSL_Key llHTTPRequest(string url, LSL_List parameters, string body) |
13947 | { | 13908 | { |
13948 | // Partial implementation: support for parameter flags needed | ||
13949 | // see http://wiki.secondlife.com/wiki/LlHTTPRequest | ||
13950 | // parameter flags support are implemented in ScriptsHttpRequests.cs | ||
13951 | // in StartHttpRequest | ||
13952 | |||
13953 | m_host.AddScriptLPS(1); | 13909 | m_host.AddScriptLPS(1); |
13954 | IHttpRequestModule httpScriptMod = | 13910 | IHttpRequestModule httpScriptMod = m_ScriptEngine.World.RequestModuleInterface<IHttpRequestModule>(); |
13955 | m_ScriptEngine.World.RequestModuleInterface<IHttpRequestModule>(); | 13911 | if(httpScriptMod == null) |
13912 | return ""; | ||
13913 | |||
13914 | if(!httpScriptMod.CheckThrottle(m_host.LocalId, m_host.OwnerID)) | ||
13915 | return UUID.Zero.ToString(); | ||
13916 | |||
13956 | List<string> param = new List<string>(); | 13917 | List<string> param = new List<string>(); |
13957 | bool ok; | 13918 | bool ok; |
13958 | Int32 flag; | 13919 | Int32 flag; |
@@ -14123,8 +14084,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
14123 | } | 14084 | } |
14124 | 14085 | ||
14125 | HttpInitialRequestStatus status; | 14086 | HttpInitialRequestStatus status; |
14126 | UUID reqID | 14087 | UUID reqID = httpScriptMod.StartHttpRequest(m_host.LocalId, m_item.ItemID, url, param, httpHeaders, body, out status); |
14127 | = httpScriptMod.StartHttpRequest(m_host.LocalId, m_item.ItemID, url, param, httpHeaders, body, out status); | ||
14128 | 14088 | ||
14129 | if (status == HttpInitialRequestStatus.DISALLOWED_BY_FILTER) | 14089 | if (status == HttpInitialRequestStatus.DISALLOWED_BY_FILTER) |
14130 | Error("llHttpRequest", string.Format("Request to {0} disallowed by filter", url)); | 14090 | Error("llHttpRequest", string.Format("Request to {0} disallowed by filter", url)); |
@@ -14132,7 +14092,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
14132 | if (reqID != UUID.Zero) | 14092 | if (reqID != UUID.Zero) |
14133 | return reqID.ToString(); | 14093 | return reqID.ToString(); |
14134 | else | 14094 | else |
14135 | return null; | 14095 | return ""; |
14136 | } | 14096 | } |
14137 | 14097 | ||
14138 | 14098 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 9d5f670..dabd399 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -3629,7 +3629,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3629 | { | 3629 | { |
3630 | CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); | 3630 | CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); |
3631 | 3631 | ||
3632 | World.ForEachRootScenePresence(delegate(ScenePresence sp) | 3632 | World.ForEachRootScenePresence(delegate (ScenePresence sp) |
3633 | { | 3633 | { |
3634 | if (sp.Firstname == FirstName && sp.Lastname == SurName) | 3634 | if (sp.Firstname == FirstName && sp.Lastname == SurName) |
3635 | { | 3635 | { |
@@ -3643,18 +3643,43 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3643 | }); | 3643 | }); |
3644 | } | 3644 | } |
3645 | 3645 | ||
3646 | public LSL_Float osGetHealth(string avatar) | 3646 | public void osKickAvatar(LSL_Key agentKey, string alert) |
3647 | { | ||
3648 | CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); | ||
3649 | |||
3650 | UUID id; | ||
3651 | if (!UUID.TryParse(agentKey, out id) || id == UUID.Zero) | ||
3652 | return; | ||
3653 | |||
3654 | ScenePresence sp = World.GetScenePresence(id); | ||
3655 | if(sp == null) | ||
3656 | return; | ||
3657 | |||
3658 | // kick client... | ||
3659 | if (alert != null) | ||
3660 | sp.ControllingClient.Kick(alert); | ||
3661 | |||
3662 | // ...and close on our side | ||
3663 | sp.Scene.CloseAgent(id, false); | ||
3664 | } | ||
3665 | |||
3666 | public LSL_Float osGetHealth(LSL_Key agentKey) | ||
3647 | { | 3667 | { |
3648 | CheckThreatLevel(ThreatLevel.None, "osGetHealth"); | 3668 | CheckThreatLevel(ThreatLevel.None, "osGetHealth"); |
3649 | 3669 | ||
3650 | LSL_Float health = new LSL_Float(-1); | 3670 | LSL_Float health = new LSL_Float(-1); |
3651 | ScenePresence presence = World.GetScenePresence(new UUID(avatar)); | 3671 | |
3672 | UUID id; | ||
3673 | if (!UUID.TryParse(agentKey, out id) || id == UUID.Zero) | ||
3674 | return health; | ||
3675 | |||
3676 | ScenePresence presence = World.GetScenePresence(id); | ||
3652 | if (presence != null) | 3677 | if (presence != null) |
3653 | health = presence.Health; | 3678 | health = presence.Health; |
3654 | return health; | 3679 | return health; |
3655 | } | 3680 | } |
3656 | 3681 | ||
3657 | public void osCauseDamage(string avatar, double damage) | 3682 | public void osCauseDamage(LSL_Key avatar, LSL_Float damage) |
3658 | { | 3683 | { |
3659 | CheckThreatLevel(ThreatLevel.High, "osCauseDamage"); | 3684 | CheckThreatLevel(ThreatLevel.High, "osCauseDamage"); |
3660 | 3685 | ||
@@ -3683,7 +3708,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3683 | } | 3708 | } |
3684 | } | 3709 | } |
3685 | 3710 | ||
3686 | public void osCauseHealing(string avatar, double healing) | 3711 | public void osCauseHealing(LSL_Key avatar, LSL_Float healing) |
3687 | { | 3712 | { |
3688 | CheckThreatLevel(ThreatLevel.High, "osCauseHealing"); | 3713 | CheckThreatLevel(ThreatLevel.High, "osCauseHealing"); |
3689 | 3714 | ||
@@ -3704,7 +3729,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3704 | presence.setHealthWithUpdate(health); | 3729 | presence.setHealthWithUpdate(health); |
3705 | } | 3730 | } |
3706 | 3731 | ||
3707 | public void osSetHealth(string avatar, double health) | 3732 | public void osSetHealth(LSL_Key avatar, LSL_Float health) |
3708 | { | 3733 | { |
3709 | CheckThreatLevel(ThreatLevel.High, "osSetHealth"); | 3734 | CheckThreatLevel(ThreatLevel.High, "osSetHealth"); |
3710 | 3735 | ||
@@ -3722,7 +3747,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3722 | } | 3747 | } |
3723 | } | 3748 | } |
3724 | 3749 | ||
3725 | public void osSetHealRate(string avatar, double healrate) | 3750 | public void osSetHealRate(LSL_Key avatar, LSL_Float healrate) |
3726 | { | 3751 | { |
3727 | CheckThreatLevel(ThreatLevel.High, "osSetHealRate"); | 3752 | CheckThreatLevel(ThreatLevel.High, "osSetHealRate"); |
3728 | 3753 | ||
@@ -3737,7 +3762,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3737 | presence.HealRate = (float)healrate; | 3762 | presence.HealRate = (float)healrate; |
3738 | } | 3763 | } |
3739 | 3764 | ||
3740 | public LSL_Float osGetHealRate(string avatar) | 3765 | public LSL_Float osGetHealRate(LSL_Key avatar) |
3741 | { | 3766 | { |
3742 | CheckThreatLevel(ThreatLevel.None, "osGetHealRate"); | 3767 | CheckThreatLevel(ThreatLevel.None, "osGetHealRate"); |
3743 | 3768 | ||
@@ -3865,29 +3890,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3865 | } | 3890 | } |
3866 | 3891 | ||
3867 | /// <summary> | 3892 | /// <summary> |
3868 | /// Get the description from an inventory item | ||
3869 | /// </summary> | ||
3870 | /// <param name="inventoryName"></param> | ||
3871 | /// <returns>Item description</returns> | ||
3872 | public LSL_String osGetInventoryDesc(string item) | ||
3873 | { | ||
3874 | CheckThreatLevel(); | ||
3875 | |||
3876 | lock (m_host.TaskInventory) | ||
3877 | { | ||
3878 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) | ||
3879 | { | ||
3880 | if (inv.Value.Name == item) | ||
3881 | { | ||
3882 | return inv.Value.Description.ToString(); | ||
3883 | } | ||
3884 | } | ||
3885 | } | ||
3886 | |||
3887 | return String.Empty; | ||
3888 | } | ||
3889 | |||
3890 | /// <summary> | ||
3891 | /// Invite user to the group this object is set to | 3893 | /// Invite user to the group this object is set to |
3892 | /// </summary> | 3894 | /// </summary> |
3893 | /// <param name="agentId"></param> | 3895 | /// <param name="agentId"></param> |
@@ -4849,8 +4851,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4849 | return Math.Atan2(mcross, dot); | 4851 | return Math.Atan2(mcross, dot); |
4850 | } | 4852 | } |
4851 | 4853 | ||
4852 | |||
4853 | //******* link sound | ||
4854 | public void osAdjustSoundVolume(LSL_Integer linknum, LSL_Float volume) | 4854 | public void osAdjustSoundVolume(LSL_Integer linknum, LSL_Float volume) |
4855 | { | 4855 | { |
4856 | m_host.AddScriptLPS(1); | 4856 | m_host.AddScriptLPS(1); |
@@ -5381,5 +5381,65 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5381 | return 1; | 5381 | return 1; |
5382 | } | 5382 | } |
5383 | 5383 | ||
5384 | public LSL_Key osGetInventoryLastOwner(LSL_String itemNameorid) | ||
5385 | { | ||
5386 | m_host.AddScriptLPS(1); | ||
5387 | |||
5388 | TaskInventoryItem item = null; | ||
5389 | UUID itemID; | ||
5390 | if (UUID.TryParse(itemNameorid, out itemID)) | ||
5391 | item = m_host.Inventory.GetInventoryItem(itemID); | ||
5392 | else | ||
5393 | item = m_host.Inventory.GetInventoryItem(itemNameorid); | ||
5394 | |||
5395 | if (item == null) | ||
5396 | return UUID.Zero.ToString(); | ||
5397 | |||
5398 | UUID id = item.LastOwnerID; | ||
5399 | if(id == UUID.Zero) | ||
5400 | id= item.OwnerID; | ||
5401 | return id.ToString(); | ||
5402 | } | ||
5403 | |||
5404 | public LSL_String osGetInventoryName(LSL_Key itemId) | ||
5405 | { | ||
5406 | m_host.AddScriptLPS(1); | ||
5407 | |||
5408 | TaskInventoryItem item = null; | ||
5409 | UUID itemID; | ||
5410 | if (UUID.TryParse(itemId, out itemID)) | ||
5411 | item = m_host.Inventory.GetInventoryItem(itemID); | ||
5412 | |||
5413 | if (item == null) | ||
5414 | return String.Empty; | ||
5415 | |||
5416 | return item.Name; | ||
5417 | } | ||
5418 | |||
5419 | public LSL_String osGetInventoryDesc(LSL_String itemNameorid) | ||
5420 | { | ||
5421 | m_host.AddScriptLPS(1); | ||
5422 | |||
5423 | TaskInventoryItem item = null; | ||
5424 | UUID itemID; | ||
5425 | if (UUID.TryParse(itemNameorid, out itemID)) | ||
5426 | item = m_host.Inventory.GetInventoryItem(itemID); | ||
5427 | else | ||
5428 | item = m_host.Inventory.GetInventoryItem(itemNameorid); | ||
5429 | |||
5430 | if (item == null) | ||
5431 | return String.Empty; | ||
5432 | |||
5433 | return item.Description; | ||
5434 | } | ||
5435 | |||
5436 | public LSL_Key osGetLastChangedEventKey() | ||
5437 | { | ||
5438 | m_host.AddScriptLPS(1); | ||
5439 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, 0); | ||
5440 | if (detectedParams == null) | ||
5441 | return String.Empty; | ||
5442 | return detectedParams.Key.ToString(); | ||
5443 | } | ||
5384 | } | 5444 | } |
5385 | } \ No newline at end of file | 5445 | } \ No newline at end of file |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/HttpRequest.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/HttpRequest.cs index 629b14b..166f2d9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/HttpRequest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/HttpRequest.cs | |||
@@ -48,14 +48,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
48 | if (m_CmdManager.m_ScriptEngine.World == null) | 48 | if (m_CmdManager.m_ScriptEngine.World == null) |
49 | return; | 49 | return; |
50 | 50 | ||
51 | IHttpRequestModule iHttpReq = | 51 | IHttpRequestModule iHttpReq = m_CmdManager.m_ScriptEngine.World.RequestModuleInterface<IHttpRequestModule>(); |
52 | m_CmdManager.m_ScriptEngine.World.RequestModuleInterface<IHttpRequestModule>(); | 52 | if(iHttpReq == null) |
53 | 53 | return; | |
54 | HttpRequestClass httpInfo = null; | ||
55 | |||
56 | if (iHttpReq != null) | ||
57 | httpInfo = (HttpRequestClass)iHttpReq.GetNextCompletedRequest(); | ||
58 | 54 | ||
55 | HttpRequestClass httpInfo = (HttpRequestClass)iHttpReq.GetNextCompletedRequest(); | ||
59 | while (httpInfo != null) | 56 | while (httpInfo != null) |
60 | { | 57 | { |
61 | //m_log.Debug("[AsyncLSL]:" + httpInfo.response_body + httpInfo.status); | 58 | //m_log.Debug("[AsyncLSL]:" + httpInfo.response_body + httpInfo.status); |
@@ -67,8 +64,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
67 | // implemented here yet anyway. Should be fixed if/when maxsize | 64 | // implemented here yet anyway. Should be fixed if/when maxsize |
68 | // is supported | 65 | // is supported |
69 | 66 | ||
70 | iHttpReq.RemoveCompletedRequest(httpInfo.ReqID); | ||
71 | |||
72 | object[] resobj = new object[] | 67 | object[] resobj = new object[] |
73 | { | 68 | { |
74 | new LSL_Types.LSLString(httpInfo.ReqID.ToString()), | 69 | new LSL_Types.LSLString(httpInfo.ReqID.ToString()), |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 12e8103..49b3f74 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -379,15 +379,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
379 | 379 | ||
380 | int osGetSimulatorMemory(); | 380 | int osGetSimulatorMemory(); |
381 | int osGetSimulatorMemoryKB(); | 381 | int osGetSimulatorMemoryKB(); |
382 | void osKickAvatar(string FirstName,string SurName,string alert); | 382 | void osKickAvatar(string FirstName, string SurName, string alert); |
383 | void osKickAvatar(LSL_Key agentId, string alert); | ||
383 | void osSetSpeed(string UUID, LSL_Float SpeedModifier); | 384 | void osSetSpeed(string UUID, LSL_Float SpeedModifier); |
384 | void osSetOwnerSpeed(LSL_Float SpeedModifier); | 385 | void osSetOwnerSpeed(LSL_Float SpeedModifier); |
385 | LSL_Float osGetHealth(string avatar); | 386 | LSL_Float osGetHealth(key agentId); |
386 | void osCauseHealing(string avatar, double healing); | 387 | void osCauseHealing(key agentId, LSL_Float healing); |
387 | void osSetHealth(string avatar, double health); | 388 | void osSetHealth(key agentId, LSL_Float health); |
388 | void osSetHealRate(string avatar, double health); | 389 | void osSetHealRate(key agentId, LSL_Float health); |
389 | LSL_Float osGetHealRate(string avatar); | 390 | LSL_Float osGetHealRate(key agentId); |
390 | void osCauseDamage(string avatar, double damage); | 391 | void osCauseDamage(key avatar, LSL_Float damage); |
391 | void osForceOtherSit(string avatar); | 392 | void osForceOtherSit(string avatar); |
392 | void osForceOtherSit(string avatar, string target); | 393 | void osForceOtherSit(string avatar, string target); |
393 | LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules); | 394 | LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules); |
@@ -400,8 +401,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
400 | 401 | ||
401 | LSL_String osUnixTimeToTimestamp(LSL_Integer time); | 402 | LSL_String osUnixTimeToTimestamp(LSL_Integer time); |
402 | 403 | ||
403 | LSL_String osGetInventoryDesc(string item); | ||
404 | |||
405 | LSL_Integer osInviteToGroup(LSL_Key agentId); | 404 | LSL_Integer osInviteToGroup(LSL_Key agentId); |
406 | LSL_Integer osEjectFromGroup(LSL_Key agentId); | 405 | LSL_Integer osEjectFromGroup(LSL_Key agentId); |
407 | 406 | ||
@@ -546,5 +545,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
546 | LSL_Integer osApproxEquals(vector va, vector vb, LSL_Float margin); | 545 | LSL_Integer osApproxEquals(vector va, vector vb, LSL_Float margin); |
547 | LSL_Integer osApproxEquals(rotation ra, rotation rb); | 546 | LSL_Integer osApproxEquals(rotation ra, rotation rb); |
548 | LSL_Integer osApproxEquals(rotation ra, rotation rb, LSL_Float margin); | 547 | LSL_Integer osApproxEquals(rotation ra, rotation rb, LSL_Float margin); |
548 | LSL_Key osGetInventoryLastOwner(LSL_String itemNameOrId); | ||
549 | LSL_String osGetInventoryName(LSL_Key itemId); | ||
550 | LSL_String osGetInventoryDesc(LSL_String itemNameOrId); | ||
551 | LSL_Key osGetLastChangedEventKey(); | ||
549 | } | 552 | } |
550 | } | 553 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index 49f46b7..8b70128 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | |||
@@ -35,7 +35,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
35 | public partial class ScriptBaseClass | 35 | public partial class ScriptBaseClass |
36 | { | 36 | { |
37 | // SCRIPTS CONSTANTS | 37 | // SCRIPTS CONSTANTS |
38 | public static readonly LSLInteger OS_APIVERSION = 2; | 38 | public static readonly LSLInteger OS_APIVERSION = 3; |
39 | 39 | ||
40 | public static readonly LSLInteger TRUE = 1; | 40 | public static readonly LSLInteger TRUE = 1; |
41 | public static readonly LSLInteger FALSE = 0; | 41 | public static readonly LSLInteger FALSE = 0; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 94df1ea..fb491e4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -965,11 +965,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
965 | return m_OSSL_Functions.osGetSimulatorMemoryKB(); | 965 | return m_OSSL_Functions.osGetSimulatorMemoryKB(); |
966 | } | 966 | } |
967 | 967 | ||
968 | public void osKickAvatar(string FirstName,string SurName,string alert) | 968 | public void osKickAvatar(string FirstName, string SurName, string alert) |
969 | { | 969 | { |
970 | m_OSSL_Functions.osKickAvatar(FirstName, SurName, alert); | 970 | m_OSSL_Functions.osKickAvatar(FirstName, SurName, alert); |
971 | } | 971 | } |
972 | 972 | ||
973 | public void osKickAvatar(LSL_Key agentId, string alert) | ||
974 | { | ||
975 | m_OSSL_Functions.osKickAvatar(agentId, alert); | ||
976 | } | ||
977 | |||
973 | public void osSetSpeed(string UUID, LSL_Float SpeedModifier) | 978 | public void osSetSpeed(string UUID, LSL_Float SpeedModifier) |
974 | { | 979 | { |
975 | m_OSSL_Functions.osSetSpeed(UUID, SpeedModifier); | 980 | m_OSSL_Functions.osSetSpeed(UUID, SpeedModifier); |
@@ -980,32 +985,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
980 | m_OSSL_Functions.osSetOwnerSpeed(SpeedModifier); | 985 | m_OSSL_Functions.osSetOwnerSpeed(SpeedModifier); |
981 | } | 986 | } |
982 | 987 | ||
983 | public LSL_Float osGetHealth(string avatar) | 988 | public LSL_Float osGetHealth(key avatar) |
984 | { | 989 | { |
985 | return m_OSSL_Functions.osGetHealth(avatar); | 990 | return m_OSSL_Functions.osGetHealth(avatar); |
986 | } | 991 | } |
987 | 992 | ||
988 | public void osCauseDamage(string avatar, double damage) | 993 | public void osCauseDamage(key avatar, LSL_Float damage) |
989 | { | 994 | { |
990 | m_OSSL_Functions.osCauseDamage(avatar, damage); | 995 | m_OSSL_Functions.osCauseDamage(avatar, damage); |
991 | } | 996 | } |
992 | 997 | ||
993 | public void osCauseHealing(string avatar, double healing) | 998 | public void osCauseHealing(key avatar, LSL_Float healing) |
994 | { | 999 | { |
995 | m_OSSL_Functions.osCauseHealing(avatar, healing); | 1000 | m_OSSL_Functions.osCauseHealing(avatar, healing); |
996 | } | 1001 | } |
997 | 1002 | ||
998 | public void osSetHealth(string avatar, double health) | 1003 | public void osSetHealth(key avatar, LSL_Float health) |
999 | { | 1004 | { |
1000 | m_OSSL_Functions.osSetHealth(avatar, health); | 1005 | m_OSSL_Functions.osSetHealth(avatar, health); |
1001 | } | 1006 | } |
1002 | 1007 | ||
1003 | public void osSetHealRate(string avatar, double health) | 1008 | public void osSetHealRate(key avatar, LSL_Float health) |
1004 | { | 1009 | { |
1005 | m_OSSL_Functions.osSetHealRate(avatar, health); | 1010 | m_OSSL_Functions.osSetHealRate(avatar, health); |
1006 | } | 1011 | } |
1007 | 1012 | ||
1008 | public LSL_Float osGetHealRate(string avatar) | 1013 | public LSL_Float osGetHealRate(key avatar) |
1009 | { | 1014 | { |
1010 | return m_OSSL_Functions.osGetHealRate(avatar); | 1015 | return m_OSSL_Functions.osGetHealRate(avatar); |
1011 | } | 1016 | } |
@@ -1055,11 +1060,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
1055 | return m_OSSL_Functions.osUnixTimeToTimestamp(time); | 1060 | return m_OSSL_Functions.osUnixTimeToTimestamp(time); |
1056 | } | 1061 | } |
1057 | 1062 | ||
1058 | public LSL_String osGetInventoryDesc(string item) | ||
1059 | { | ||
1060 | return m_OSSL_Functions.osGetInventoryDesc(item); | ||
1061 | } | ||
1062 | |||
1063 | public LSL_Integer osInviteToGroup(LSL_Key agentId) | 1063 | public LSL_Integer osInviteToGroup(LSL_Key agentId) |
1064 | { | 1064 | { |
1065 | return m_OSSL_Functions.osInviteToGroup(agentId); | 1065 | return m_OSSL_Functions.osInviteToGroup(agentId); |
@@ -1361,5 +1361,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
1361 | { | 1361 | { |
1362 | return m_OSSL_Functions.osApproxEquals(ra, rb, margin); | 1362 | return m_OSSL_Functions.osApproxEquals(ra, rb, margin); |
1363 | } | 1363 | } |
1364 | |||
1365 | public LSL_Key osGetInventoryLastOwner(LSL_String itemNameOrId) | ||
1366 | { | ||
1367 | return m_OSSL_Functions.osGetInventoryLastOwner(itemNameOrId); | ||
1368 | } | ||
1369 | |||
1370 | public LSL_String osGetInventoryName(LSL_Key itemId) | ||
1371 | { | ||
1372 | return m_OSSL_Functions.osGetInventoryName(itemId); | ||
1373 | } | ||
1374 | |||
1375 | public LSL_String osGetInventoryDesc(LSL_String itemNameOrId) | ||
1376 | { | ||
1377 | return m_OSSL_Functions.osGetInventoryDesc(itemNameOrId); | ||
1378 | } | ||
1379 | |||
1380 | public LSL_Key osGetLastChangedEventKey() | ||
1381 | { | ||
1382 | return m_OSSL_Functions.osGetLastChangedEventKey(); | ||
1383 | } | ||
1364 | } | 1384 | } |
1365 | } | 1385 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index 019a0d9..351fca9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | |||
@@ -699,7 +699,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
699 | // If min event delay is set then ignore any events untill the time has expired | 699 | // If min event delay is set then ignore any events untill the time has expired |
700 | // This currently only allows 1 event of any type in the given time period. | 700 | // This currently only allows 1 event of any type in the given time period. |
701 | // This may need extending to allow for a time for each individual event type. | 701 | // This may need extending to allow for a time for each individual event type. |
702 | if (m_eventDelayTicks != 0) | 702 | if (m_eventDelayTicks != 0 && |
703 | data.EventName != "state" && data.EventName != "state_entry" && data.EventName != "state_exit" | ||
704 | && data.EventName != "run_time_permissions" && data.EventName != "http_request" && data.EventName != "link_message") | ||
703 | { | 705 | { |
704 | if (DateTime.Now.Ticks < m_nextEventTimeTicks) | 706 | if (DateTime.Now.Ticks < m_nextEventTimeTicks) |
705 | return; | 707 | return; |