diff options
author | onefang | 2019-09-11 16:36:50 +1000 |
---|---|---|
committer | onefang | 2019-09-11 16:36:50 +1000 |
commit | 50cd1ffd32f69228e566f2b0b89f86ea0d9fe489 (patch) | |
tree | 52f2ab0c04f1a5d7d6ac5dc872981b4b156447e7 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs | |
parent | Renamed branch to SledjChisl. (diff) | |
parent | Bump to release flavour, build 0. (diff) | |
download | opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.zip opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.gz opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.bz2 opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.xz |
Merge branch 'SledjChisl'
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs index e5e43f8..e50b7fd 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs | |||
@@ -120,7 +120,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
120 | LSShoutError("LightShare functions are not enabled."); | 120 | LSShoutError("LightShare functions are not enabled."); |
121 | return new LSL_List(); | 121 | return new LSL_List(); |
122 | } | 122 | } |
123 | m_host.AddScriptLPS(1); | ||
124 | RegionLightShareData wl = m_host.ParentGroup.Scene.RegionInfo.WindlightSettings; | 123 | RegionLightShareData wl = m_host.ParentGroup.Scene.RegionInfo.WindlightSettings; |
125 | 124 | ||
126 | LSL_List values = new LSL_List(); | 125 | LSL_List values = new LSL_List(); |
@@ -295,7 +294,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
295 | idx++; | 294 | idx++; |
296 | try | 295 | try |
297 | { | 296 | { |
298 | iQ = rules.GetQuaternionItem(idx); | 297 | iQ = rules.GetVector4Item(idx); |
299 | } | 298 | } |
300 | catch (InvalidCastException) | 299 | catch (InvalidCastException) |
301 | { | 300 | { |
@@ -319,7 +318,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
319 | idx++; | 318 | idx++; |
320 | try | 319 | try |
321 | { | 320 | { |
322 | iQ = rules.GetQuaternionItem(idx); | 321 | iQ = rules.GetVector4Item(idx); |
323 | } | 322 | } |
324 | catch (InvalidCastException) | 323 | catch (InvalidCastException) |
325 | { | 324 | { |
@@ -342,7 +341,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
342 | idx++; | 341 | idx++; |
343 | try | 342 | try |
344 | { | 343 | { |
345 | iQ = rules.GetQuaternionItem(idx); | 344 | iQ = rules.GetVector4Item(idx); |
346 | } | 345 | } |
347 | catch (InvalidCastException) | 346 | catch (InvalidCastException) |
348 | { | 347 | { |
@@ -532,7 +531,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
532 | idx++; | 531 | idx++; |
533 | try | 532 | try |
534 | { | 533 | { |
535 | iQ = rules.GetQuaternionItem(idx); | 534 | iQ = rules.GetVector4Item(idx); |
536 | } | 535 | } |
537 | catch (InvalidCastException) | 536 | catch (InvalidCastException) |
538 | { | 537 | { |
@@ -654,7 +653,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
654 | break; | 653 | break; |
655 | case (int)ScriptBaseClass.WL_SUN_MOON_COLOR: | 654 | case (int)ScriptBaseClass.WL_SUN_MOON_COLOR: |
656 | idx++; | 655 | idx++; |
657 | iQ = rules.GetQuaternionItem(idx); | 656 | iQ = rules.GetVector4Item(idx); |
658 | try | 657 | try |
659 | { | 658 | { |
660 | wl.sunMoonColor = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); | 659 | wl.sunMoonColor = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); |
@@ -721,7 +720,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
721 | { | 720 | { |
722 | ScenePresence sp = World.GetScenePresence(m_host.OwnerID); | 721 | ScenePresence sp = World.GetScenePresence(m_host.OwnerID); |
723 | 722 | ||
724 | if (sp == null || sp.GodLevel < 200) | 723 | if (sp == null || !sp.IsViewerUIGod) |
725 | { | 724 | { |
726 | LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); | 725 | LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); |
727 | return 0; | 726 | return 0; |
@@ -729,7 +728,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
729 | } | 728 | } |
730 | 729 | ||
731 | int success = 0; | 730 | int success = 0; |
732 | m_host.AddScriptLPS(1); | ||
733 | 731 | ||
734 | if (LightShareModule.EnableWindlight) | 732 | if (LightShareModule.EnableWindlight) |
735 | { | 733 | { |
@@ -768,7 +766,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
768 | { | 766 | { |
769 | ScenePresence sp = World.GetScenePresence(m_host.OwnerID); | 767 | ScenePresence sp = World.GetScenePresence(m_host.OwnerID); |
770 | 768 | ||
771 | if (sp == null || sp.GodLevel < 200) | 769 | if (sp == null || !sp.IsViewerUIGod) |
772 | { | 770 | { |
773 | LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); | 771 | LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); |
774 | return; | 772 | return; |
@@ -799,7 +797,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
799 | { | 797 | { |
800 | ScenePresence sp = World.GetScenePresence(m_host.OwnerID); | 798 | ScenePresence sp = World.GetScenePresence(m_host.OwnerID); |
801 | 799 | ||
802 | if (sp == null || sp.GodLevel < 200) | 800 | if (sp == null || !sp.IsViewerUIGod) |
803 | { | 801 | { |
804 | LSShoutError("lsSetWindlightSceneTargeted can only be used by estate managers or owners."); | 802 | LSShoutError("lsSetWindlightSceneTargeted can only be used by estate managers or owners."); |
805 | return 0; | 803 | return 0; |
@@ -807,7 +805,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
807 | } | 805 | } |
808 | 806 | ||
809 | int success = 0; | 807 | int success = 0; |
810 | m_host.AddScriptLPS(1); | ||
811 | 808 | ||
812 | if (LightShareModule.EnableWindlight) | 809 | if (LightShareModule.EnableWindlight) |
813 | { | 810 | { |
@@ -831,6 +828,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
831 | } | 828 | } |
832 | 829 | ||
833 | return success; | 830 | return success; |
834 | } | 831 | } |
835 | } | 832 | } |
836 | } | 833 | } |