From 4d652c704186e9e399ffc6fc1bdf1f1dca056370 Mon Sep 17 00:00:00 2001 From: Talun Date: Sat, 14 Apr 2012 00:37:55 +0100 Subject: Missing or unimplemented LSL memory functions. Implemented to behave as if scripts were LSO. Signed-off-by: nebadon --- .../Shared/Api/Implementation/LSL_Api.cs | 40 +++++++++++++++------- 1 file changed, 28 insertions(+), 12 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 078a22a..a19427d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -10949,34 +10949,50 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return 1; } - #region Not Implemented - // - // Listing the unimplemented lsl functions here, please move - // them from this region as they are completed - // + public LSL_Integer llGetMemoryLimit() + { + m_host.AddScriptLPS(1); + // The value returned for LSO scripts in SL + return 16384; + } - public void llGetEnv(LSL_String name) + public LSL_Integer llSetMemoryLimit(LSL_Integer limit) { m_host.AddScriptLPS(1); - NotImplemented("llGetEnv"); + // Treat as an LSO script + return ScriptBaseClass.FALSE; } - public void llGetSPMaxMemory() + public LSL_Integer llGetSPMaxMemory() { m_host.AddScriptLPS(1); - NotImplemented("llGetSPMaxMemory"); + // The value returned for LSO scripts in SL + return 16384; } - public void llGetUsedMemory() + public LSL_Integer llGetUsedMemory() { m_host.AddScriptLPS(1); - NotImplemented("llGetUsedMemory"); + // The value returned for LSO scripts in SL + return 16384; } public void llScriptProfiler(LSL_Integer flags) { m_host.AddScriptLPS(1); - NotImplemented("llScriptProfiler"); + // This does nothing for LSO scripts in SL + } + + #region Not Implemented + // + // Listing the unimplemented lsl functions here, please move + // them from this region as they are completed + // + + public void llGetEnv(LSL_String name) + { + m_host.AddScriptLPS(1); + NotImplemented("llGetEnv"); } public void llSetSoundQueueing(int queue) -- cgit v1.1