aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs21
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}