diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index de7da0ed00..c1c1eafe2e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -3818,15 +3818,40 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
///
/// Set parameters for light projection in host prim
///
- public void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb)
+ public void osSetProjectionParams(LSL_Integer projection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb)
{
- osSetProjectionParams(UUID.Zero.ToString(), projection, texture, fov, focus, amb);
+ SetProjectionParams(m_host, projection, texture, fov, focus, amb);
+ }
+
+ ///
+ /// Set parameters for light projection of a linkset prim
+ ///
+ public void osSetProjectionParams(LSL_Integer linknum, LSL_Integer projection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb)
+ {
+ if (linknum == ScriptBaseClass.LINK_THIS || linknum == m_host.LinkNum)
+ {
+ SetProjectionParams(m_host, projection, texture, fov, focus, amb);
+ return;
+ }
+
+ if (linknum < 0 || linknum > m_host.ParentGroup.PrimCount)
+ return;
+
+ if(linknum < 2 && m_host.LinkNum < 2)
+ {
+ SetProjectionParams(m_host, projection, texture, fov, focus, amb);
+ return;
+ }
+
+ SceneObjectPart obj = m_host.ParentGroup.GetLinkNumPart(linknum);
+ if(obj != null)
+ SetProjectionParams(obj, projection, texture, fov, focus, amb);
}
///
/// Set parameters for light projection with uuid of target prim
///
- public void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb)
+ public void osSetProjectionParams(LSL_Key prim, LSL_Integer llprojection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb)
{
CheckThreatLevel(ThreatLevel.High, "osSetProjectionParams");
@@ -3841,7 +3866,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (obj == null)
return;
}
+ SetProjectionParams(obj, llprojection, texture, fov, focus, amb);
+ }
+ private void SetProjectionParams(SceneObjectPart obj, LSL_Integer llprojection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb)
+ {
+ bool projection = llprojection != 0;
obj.Shape.ProjectionEntry = projection;
obj.Shape.ProjectionTextureUUID = new UUID(texture);
obj.Shape.ProjectionFOV = (float)fov;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index 26bac00da4..ce6aaf8852 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -393,8 +393,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
void osForceOtherSit(string avatar, string target);
LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules);
void osSetPrimitiveParams(LSL_Key prim, LSL_List rules);
- void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb);
- void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb);
+ void osSetProjectionParams(LSL_Integer projection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb);
+ void osSetProjectionParams(LSL_Key prim, LSL_Integer projection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb);
+ void osSetProjectionParams(LSL_Integer linknumber, LSL_Integer projection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb);
LSL_List osGetAvatarList();
LSL_List osGetNPCList();
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index 7a4a5fb1d3..fd5142f71c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -1035,16 +1035,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
m_OSSL_Functions.osSetPrimitiveParams(prim, rules);
}
- public void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb)
+ public void osSetProjectionParams(LSL_Integer projection, LSL_Key texture, double fov, double focus, double amb)
{
m_OSSL_Functions.osSetProjectionParams(projection, texture, fov, focus, amb);
}
- public void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb)
+ public void osSetProjectionParams(LSL_Key prim, LSL_Integer projection, LSL_Key texture, double fov, double focus, double amb)
{
m_OSSL_Functions.osSetProjectionParams(prim, projection, texture, fov, focus, amb);
}
+ public void osSetProjectionParams(LSL_Integer linknumber, LSL_Integer projection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb)
+ {
+ m_OSSL_Functions.osSetProjectionParams(linknumber, projection, texture, fov, focus, amb);
+ }
+
public LSL_List osGetAvatarList()
{
return m_OSSL_Functions.osGetAvatarList();