From e74e591e0b2196bcf58e17f604e2d8d4819c3917 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Thu, 15 Jul 2010 00:15:23 +0100 Subject: [PATCH] properly expose prim media LSL functions to scripts scripts using these functions should now compile but I don't know how well the methods themselves work yet llSetPrimMedia(), at least, appears to have problems when a current url is set for a face that doesn't yet have a texture --- .../CoreModules/World/Media/Moap/MoapModule.cs | 2 +- .../ScriptEngine/Shared/Api/Interface/ILSL_Api.cs | 3 +++ .../ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs index 3c546c48e3..4bbac6e3a1 100644 --- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs +++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs @@ -186,7 +186,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap CheckFaceParam(part, face); if (null == part.Shape.Media) - part.Shape.Media = new List(part.GetNumberOfSides()); + part.Shape.Media = new List(new MediaEntry[part.GetNumberOfSides()]); part.Shape.Media[face] = me; UpdateMediaUrl(part); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs index cba46a36c7..561e3b3213 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs @@ -62,6 +62,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces void llBreakLink(int linknum); LSL_Integer llCeil(double f); void llClearCameraParams(); + LSL_Integer llClearPrimMedia(LSL_Integer face); void llCloseRemoteDataChannel(string channel); LSL_Float llCloud(LSL_Vector offset); void llCollisionFilter(string name, string id, int accept); @@ -162,6 +163,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces LSL_List llGetParcelPrimOwners(LSL_Vector pos); LSL_Integer llGetPermissions(); LSL_Key llGetPermissionsKey(); + LSL_List llGetPrimMediaParams(int face, LSL_List rules); LSL_Vector llGetPos(); LSL_List llGetPrimitiveParams(LSL_List rules); LSL_Integer llGetRegionAgentCount(); @@ -332,6 +334,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces void llSetParcelMusicURL(string url); void llSetPayPrice(int price, LSL_List quick_pay_buttons); void llSetPos(LSL_Vector pos); + LSL_Integer llSetPrimMediaParams(int face, LSL_List rules); void llSetPrimitiveParams(LSL_List rules); void llSetLinkPrimitiveParamsFast(int linknum, LSL_List rules); void llSetPrimURL(string url); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index 3339995f66..451163fe99 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs @@ -1832,5 +1832,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase { return m_LSL_Functions.llXorBase64StringsCorrect(str1, str2); } + + public LSL_List llGetPrimMediaParams(int face, LSL_List rules) + { + return m_LSL_Functions.llGetPrimMediaParams(face, rules); + } + + public LSL_Integer llSetPrimMediaParams(int face, LSL_List rules) + { + return m_LSL_Functions.llSetPrimMediaParams(face, rules); + } + + public LSL_Integer llClearPrimMedia(LSL_Integer face) + { + return m_LSL_Functions.llClearPrimMedia(face); + } } }