From 307f26e80e7d14a49fe0cf766849fb9bd81b1c5f Mon Sep 17 00:00:00 2001
From: Charles Krinke
Date: Mon, 29 Sep 2008 20:24:59 +0000
Subject: Mantis#2299. Thank you kindly, Idb for a patch that: OS/SL script
conformance, implement llSoundPreload and llRemoteLoadScript to behave as in
SL. In SL llSoundPreload appears to do nothing. In OS llRemoteLoadScript
shouts an error when invoked "Deprecated. Please use llRemoteLoadScriptPin
instead."
---
.../Shared/Api/Implementation/LSL_Api.cs | 20 ++++++++++++++------
.../ScriptEngine/Shared/Api/Interface/ILSL_Api.cs | 4 ++--
.../ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs | 8 ++++----
3 files changed, 20 insertions(+), 12 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 540ff98..7c19ad7 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -134,6 +134,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_ScriptEngine.SetState(m_itemID, newState);
}
+ ///
+ /// Reset the named script. The script must be present
+ /// in the same prim.
+ ///
public void llResetScript()
{
m_host.AddScriptLPS(1);
@@ -2616,10 +2620,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
NotImplemented("llMinEventDelay");
}
- public void llSoundPreload()
+ ///
+ /// llSoundPreload is deprecated. In SL this appears to do absolutely nothing
+ /// and is documented to have no delay.
+ ///
+ public void llSoundPreload(string sound)
{
m_host.AddScriptLPS(1);
- Deprecated("llSoundPreload");
}
public void llRotLookAt(LSL_Rotation target, double strength, double damping)
@@ -5356,14 +5363,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
///
- /// Reset the named script. The script must be present
- /// in the same prim.
+ /// This is a depecated function so this just replicates the result of
+ /// invoking it in SL
///
- public void llRemoteLoadScript()
+ public void llRemoteLoadScript(string target, string name, int running, int start_param)
{
m_host.AddScriptLPS(1);
- Deprecated("llRemoteLoadScript");
+ // Report an error as it does in SL
+ ShoutError("Deprecated. Please use llRemoteLoadScriptPin instead.");
// ScriptSleep(3000);
}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
index 96d99eb..812f2ff 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
@@ -262,7 +262,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
void llReleaseControls();
void llRemoteDataReply(string channel, string message_id, string sdata, int idata);
void llRemoteDataSetRegion();
- void llRemoteLoadScript();
+ void llRemoteLoadScript(string target, string name, int running, int start_param);
void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param);
void llRemoveFromLandBanList(string avatar);
void llRemoveFromLandPassList(string avatar);
@@ -348,7 +348,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
void llSitTarget(LSL_Vector offset, LSL_Rotation rot);
void llSleep(double sec);
void llSound();
- void llSoundPreload();
+ void llSoundPreload(string sound);
LSL_Float llSqrt(double f);
void llStartAnimation(string anim);
void llStopAnimation(string anim);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
index 32cfff6..bebb011 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
@@ -1169,9 +1169,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
m_LSL_Functions.llRemoteDataSetRegion();
}
- public void llRemoteLoadScript()
+ public void llRemoteLoadScript(string target, string name, int running, int start_param)
{
- m_LSL_Functions.llRemoteLoadScript();
+ m_LSL_Functions.llRemoteLoadScript(target, name, running, start_param);
}
public void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param)
@@ -1599,9 +1599,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
m_LSL_Functions.llSound();
}
- public void llSoundPreload()
+ public void llSoundPreload(string sound)
{
- m_LSL_Functions.llSoundPreload();
+ m_LSL_Functions.llSoundPreload(sound);
}
public LSL_Float llSqrt(double f)
--
cgit v1.1