From edb2344796d04146dd78ec94ed5db1a9d84c2b26 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Sat, 8 Nov 2008 21:25:26 +0000 Subject: Mantis#2583. Thank you kindly, Idb for a patch that solves: PRIM_TEMP_ON_REZ and PRIM_MATERIAL are not implemented in llSetPrimitiveParams so support for these is in the patch. Also two deprecated functions throw errors. They are changed to behave as in SL: llSetPrimURL - Does nothing except the sleep (currently commented out) & llRefreshPrimURL shouts "llRefreshPrimURL - not yet supported" on the error channel --- .../Shared/Api/Implementation/LSL_Api.cs | 47 ++++++++++++++-------- 1 file changed, 31 insertions(+), 16 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 08f8c01..e905da6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -6045,6 +6045,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetPrimitiveParams(LSL_List rules) { + m_host.AddScriptLPS(1); SetPrimParams(m_host, rules); } @@ -6329,16 +6330,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api case (int)ScriptBaseClass.PRIM_MATERIAL: if (remain < 1) return; - if (part != null) - { - /* Unhandled at this time - sends "Unhandled" message - will enable when available - byte material = Convert.ToByte((int)rules.GetLSLIntegerItem(idx++)); - part.Material = material; - */ - return; - } - break; + int mat = rules.GetLSLIntegerItem(idx++); + if (mat < 0 || mat > 7) + return; + + part.Material = Convert.ToByte(mat); + break; case (int)ScriptBaseClass.PRIM_PHANTOM: if (remain < 1) return; @@ -6352,8 +6349,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api phantom = false; part.ScriptSetPhantomStatus(phantom); - part.ScheduleFullUpdate(); - break; + break; case (int)ScriptBaseClass.PRIM_PHYSICS: if (remain < 1) return; @@ -6365,8 +6361,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api else physics = false; - m_host.ScriptSetPhysicsStatus(physics); - part.ScheduleFullUpdate(); + part.ScriptSetPhysicsStatus(physics); + break; + case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ: + if (remain < 1) + return; + string temp = rules.Data[idx++].ToString(); + bool tempOnRez; + + if (temp.Equals("1")) + tempOnRez = true; + else + tempOnRez = false; + + part.ScriptSetTemporaryStatus(tempOnRez); break; } } @@ -7999,17 +8007,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return new LSL_Rotation(); } + /// + /// The SL implementation does nothing, it is deprecated + /// This duplicates SL + /// public void llSetPrimURL(string url) { m_host.AddScriptLPS(1); - NotImplemented("llSetPrimURL"); // ScriptSleep(2000); } + /// + /// The SL implementation shouts an error, it is deprecated + /// This duplicates SL + /// public void llRefreshPrimURL() { m_host.AddScriptLPS(1); - NotImplemented("llRefreshPrimURL"); + ShoutError("llRefreshPrimURL - not yet supported"); // ScriptSleep(20000); } -- cgit v1.1