aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorUbitUmarov2019-04-18 15:26:27 +0100
committerUbitUmarov2019-04-18 15:26:27 +0100
commit5314f375c50f3a81f0bad0507800745a555b7e59 (patch)
tree27ae4d3fad8bf8ddadf530cdd3f48e90ae6941f2 /OpenSim/Region/ScriptEngine
parent mantis 8517: actually let NULL_KEY do the same as on PRIM_TEXTURE (diff)
downloadopensim-SC-5314f375c50f3a81f0bad0507800745a555b7e59.zip
opensim-SC-5314f375c50f3a81f0bad0507800745a555b7e59.tar.gz
opensim-SC-5314f375c50f3a81f0bad0507800745a555b7e59.tar.bz2
opensim-SC-5314f375c50f3a81f0bad0507800745a555b7e59.tar.xz
change osSetProjectionParams a bit and add a variant that atkes a linknumber argument. For now can only change one prim per call
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs36
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs5
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs9
3 files changed, 43 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index de7da0e..c1c1eaf 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
3818 /// <summary> 3818 /// <summary>
3819 /// Set parameters for light projection in host prim 3819 /// Set parameters for light projection in host prim
3820 /// </summary> 3820 /// </summary>
3821 public void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb) 3821 public void osSetProjectionParams(LSL_Integer projection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb)
3822 { 3822 {
3823 osSetProjectionParams(UUID.Zero.ToString(), projection, texture, fov, focus, amb); 3823 SetProjectionParams(m_host, projection, texture, fov, focus, amb);
3824 }
3825
3826 /// <summary>
3827 /// Set parameters for light projection of a linkset prim
3828 /// </summary>
3829 public void osSetProjectionParams(LSL_Integer linknum, LSL_Integer projection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb)
3830 {
3831 if (linknum == ScriptBaseClass.LINK_THIS || linknum == m_host.LinkNum)
3832 {
3833 SetProjectionParams(m_host, projection, texture, fov, focus, amb);
3834 return;
3835 }
3836
3837 if (linknum < 0 || linknum > m_host.ParentGroup.PrimCount)
3838 return;
3839
3840 if(linknum < 2 && m_host.LinkNum < 2)
3841 {
3842 SetProjectionParams(m_host, projection, texture, fov, focus, amb);
3843 return;
3844 }
3845
3846 SceneObjectPart obj = m_host.ParentGroup.GetLinkNumPart(linknum);
3847 if(obj != null)
3848 SetProjectionParams(obj, projection, texture, fov, focus, amb);
3824 } 3849 }
3825 3850
3826 /// <summary> 3851 /// <summary>
3827 /// Set parameters for light projection with uuid of target prim 3852 /// Set parameters for light projection with uuid of target prim
3828 /// </summary> 3853 /// </summary>
3829 public void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb) 3854 public void osSetProjectionParams(LSL_Key prim, LSL_Integer llprojection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb)
3830 { 3855 {
3831 CheckThreatLevel(ThreatLevel.High, "osSetProjectionParams"); 3856 CheckThreatLevel(ThreatLevel.High, "osSetProjectionParams");
3832 3857
@@ -3841,7 +3866,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3841 if (obj == null) 3866 if (obj == null)
3842 return; 3867 return;
3843 } 3868 }
3869 SetProjectionParams(obj, llprojection, texture, fov, focus, amb);
3870 }
3844 3871
3872 private void SetProjectionParams(SceneObjectPart obj, LSL_Integer llprojection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb)
3873 {
3874 bool projection = llprojection != 0;
3845 obj.Shape.ProjectionEntry = projection; 3875 obj.Shape.ProjectionEntry = projection;
3846 obj.Shape.ProjectionTextureUUID = new UUID(texture); 3876 obj.Shape.ProjectionTextureUUID = new UUID(texture);
3847 obj.Shape.ProjectionFOV = (float)fov; 3877 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 26bac00..ce6aaf8 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
393 void osForceOtherSit(string avatar, string target); 393 void osForceOtherSit(string avatar, string target);
394 LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules); 394 LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules);
395 void osSetPrimitiveParams(LSL_Key prim, LSL_List rules); 395 void osSetPrimitiveParams(LSL_Key prim, LSL_List rules);
396 void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb); 396 void osSetProjectionParams(LSL_Integer projection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb);
397 void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb); 397 void osSetProjectionParams(LSL_Key prim, LSL_Integer projection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb);
398 void osSetProjectionParams(LSL_Integer linknumber, LSL_Integer projection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb);
398 399
399 LSL_List osGetAvatarList(); 400 LSL_List osGetAvatarList();
400 LSL_List osGetNPCList(); 401 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 7a4a5fb..fd5142f 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
1035 m_OSSL_Functions.osSetPrimitiveParams(prim, rules); 1035 m_OSSL_Functions.osSetPrimitiveParams(prim, rules);
1036 } 1036 }
1037 1037
1038 public void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb) 1038 public void osSetProjectionParams(LSL_Integer projection, LSL_Key texture, double fov, double focus, double amb)
1039 { 1039 {
1040 m_OSSL_Functions.osSetProjectionParams(projection, texture, fov, focus, amb); 1040 m_OSSL_Functions.osSetProjectionParams(projection, texture, fov, focus, amb);
1041 } 1041 }
1042 1042
1043 public void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb) 1043 public void osSetProjectionParams(LSL_Key prim, LSL_Integer projection, LSL_Key texture, double fov, double focus, double amb)
1044 { 1044 {
1045 m_OSSL_Functions.osSetProjectionParams(prim, projection, texture, fov, focus, amb); 1045 m_OSSL_Functions.osSetProjectionParams(prim, projection, texture, fov, focus, amb);
1046 } 1046 }
1047 1047
1048 public void osSetProjectionParams(LSL_Integer linknumber, LSL_Integer projection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb)
1049 {
1050 m_OSSL_Functions.osSetProjectionParams(linknumber, projection, texture, fov, focus, amb);
1051 }
1052
1048 public LSL_List osGetAvatarList() 1053 public LSL_List osGetAvatarList()
1049 { 1054 {
1050 return m_OSSL_Functions.osGetAvatarList(); 1055 return m_OSSL_Functions.osGetAvatarList();