From dc95e38e42dbc2d1386375a2ff70341f4a92be94 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Sun, 22 May 2011 14:59:18 -0400 Subject: Add stubs for unimplemented lsl functions --- .../Shared/Api/Implementation/LSL_Api.cs | 85 +++++++++++++++++----- 1 file changed, 67 insertions(+), 18 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 1cf03b8..e3d0dac 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3316,12 +3316,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return m_ScriptEngine.GetStartParameter(m_itemID); } - public void llGodLikeRezObject(string inventory, LSL_Vector pos) - { - m_host.AddScriptLPS(1); - NotImplemented("llGodLikeRezObject"); - } - public void llRequestPermissions(string agent, int perm) { UUID agentID = new UUID(); @@ -4189,12 +4183,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.CollisionSoundVolume = (float)impact_volume; } - public void llCollisionSprite(string impact_sprite) - { - m_host.AddScriptLPS(1); - NotImplemented("llCollisionSprite"); - } - public LSL_String llGetAnimation(string id) { // This should only return a value if the avatar is in the same region @@ -5526,12 +5514,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ScriptSleep(100); } - public void llSetSoundQueueing(int queue) - { - m_host.AddScriptLPS(1); - NotImplemented("llSetSoundQueueing"); - } - public void llSetSoundRadius(double radius) { m_host.AddScriptLPS(1); @@ -10312,6 +10294,73 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return rq.ToString(); } + + #region Not Implemented + // + // Listing the unimplemented lsl functions here, please move + // them from this region as they are completed + // + public void llCastRay(LSL_Vector start, LSL_Vector end, LSL_List options) + { + m_host.AddScriptLPS(1); + NotImplemented("llCastRay"); + + } + + public void llGetEnv(LSL_String name) + { + m_host.AddScriptLPS(1); + NotImplemented("llGetEnv"); + + } + + public void llGetSPMaxMemory() + { + m_host.AddScriptLPS(1); + NotImplemented("llGetSPMaxMemory"); + + } + + public void llGetUsedMemory() + { + m_host.AddScriptLPS(1); + NotImplemented("llGetUsedMemory"); + + } + + public void llRegionSayTo( LSL_Key target, LSL_Integer channel, LSL_String msg ) + { + m_host.AddScriptLPS(1); + NotImplemented("llRegionSayTo"); + + } + + public void llScriptProfiler( LSL_Integer flags ) + { + m_host.AddScriptLPS(1); + NotImplemented("llScriptProfiler"); + + } + + public void llSetSoundQueueing(int queue) + { + m_host.AddScriptLPS(1); + NotImplemented("llSetSoundQueueing"); + } + + public void llCollisionSprite(string impact_sprite) + { + m_host.AddScriptLPS(1); + NotImplemented("llCollisionSprite"); + } + + public void llGodLikeRezObject(string inventory, LSL_Vector pos) + { + m_host.AddScriptLPS(1); + NotImplemented("llGodLikeRezObject"); + } + + #endregion } public class NotecardCache -- cgit v1.1 From 24c00acedc1575bf11fb5801bebdc5d45a93c277 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 23 May 2011 02:52:28 +0100 Subject: Fix Mantis #4429: Allow llGiveInventory to work across sim borders. --- .../Shared/Api/Implementation/LSL_Api.cs | 32 ++++++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index e3d0dac..ce7d97c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3864,9 +3864,29 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api throw new Exception(String.Format("The inventory object '{0}' could not be found", inventory)); } - // check if destination is an avatar - if (World.GetScenePresence(destId) != null) + // check if destination is an object + if (World.GetSceneObjectPart(destId) != null) { + // destination is an object + World.MoveTaskInventoryItem(destId, m_host, objId); + } + else + { + ScenePresence presence = World.GetScenePresence(destId); + + if (presence == null) + { + UserAccount account = + World.UserAccountService.GetUserAccount( + World.RegionInfo.ScopeID, + destId); + + if (account == null) + { + llSay(0, "Can't find destination "+destId.ToString()); + return; + } + } // destination is an avatar InventoryItemBase agentItem = World.MoveTaskInventoryItem(destId, UUID.Zero, m_host, objId); @@ -3887,16 +3907,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.AbsolutePosition.ToString(), agentItem.ID, true, m_host.AbsolutePosition, bucket); - if (m_TransferModule != null) m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); + ScriptSleep(3000); } - else - { - // destination is an object - World.MoveTaskInventoryItem(destId, m_host, objId); - } - ScriptSleep(3000); } public void llRemoveInventory(string name) -- cgit v1.1 From 61d4291da56e18c7777adebbcfce2c092a2d9a69 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 24 May 2011 03:17:12 +0100 Subject: Create a method to force the script engine to save state from outside --- OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 97ab411..d253c6a 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -393,11 +393,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine return 0; } - public object DoMaintenance(object p) + public void SaveAllState() { - object[] parms = (object[])p; - int sleepTime = (int)parms[0]; - foreach (IScriptInstance inst in m_Scripts.Values) { if (inst.EventTime() > m_EventLimit) @@ -407,6 +404,14 @@ namespace OpenSim.Region.ScriptEngine.XEngine inst.Start(); } } + } + + public object DoMaintenance(object p) + { + object[] parms = (object[])p; + int sleepTime = (int)parms[0]; + + SaveAllState(); System.Threading.Thread.Sleep(sleepTime); -- cgit v1.1