diff options
author | Jonathan Freedman | 2010-11-05 19:10:02 -0700 |
---|---|---|
committer | Jonathan Freedman | 2010-11-05 19:10:02 -0700 |
commit | 4f40374464899dad82abdb9c36ea863ceac0d83f (patch) | |
tree | a9b116ccca55fb07b8c79ab7f6fdfafc8466d740 /OpenSim/Region/ScriptEngine | |
parent | Merge branch 'master' into mantis5110 (diff) | |
parent | Merge branch 'master' of /var/git/opensim/ (diff) | |
download | opensim-SC_OLD-4f40374464899dad82abdb9c36ea863ceac0d83f.zip opensim-SC_OLD-4f40374464899dad82abdb9c36ea863ceac0d83f.tar.gz opensim-SC_OLD-4f40374464899dad82abdb9c36ea863ceac0d83f.tar.bz2 opensim-SC_OLD-4f40374464899dad82abdb9c36ea863ceac0d83f.tar.xz |
Merge git://github.com/opensim/opensim into mantis5110
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
3 files changed, 23 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs index 665b39f..645566e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs | |||
@@ -455,6 +455,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
455 | if (LightShareModule.EnableWindlight) | 455 | if (LightShareModule.EnableWindlight) |
456 | { | 456 | { |
457 | RegionLightShareData wl = getWindlightProfileFromRules(rules); | 457 | RegionLightShareData wl = getWindlightProfileFromRules(rules); |
458 | wl.valid = true; | ||
458 | m_host.ParentGroup.Scene.StoreWindlightProfile(wl); | 459 | m_host.ParentGroup.Scene.StoreWindlightProfile(wl); |
459 | success = 1; | 460 | success = 1; |
460 | } | 461 | } |
@@ -465,6 +466,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
465 | } | 466 | } |
466 | return success; | 467 | return success; |
467 | } | 468 | } |
469 | public void lsClearWindlightScene() | ||
470 | { | ||
471 | if (!m_LSFunctionsEnabled) | ||
472 | { | ||
473 | LSShoutError("LightShare functions are not enabled."); | ||
474 | return; | ||
475 | } | ||
476 | if (!World.RegionInfo.EstateSettings.IsEstateManager(m_host.OwnerID) && World.GetScenePresence(m_host.OwnerID).GodLevel < 200) | ||
477 | { | ||
478 | LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); | ||
479 | return; | ||
480 | } | ||
481 | |||
482 | m_host.ParentGroup.Scene.RegionInfo.WindlightSettings.valid = false; | ||
483 | if (m_host.ParentGroup.Scene.SimulationDataService != null) | ||
484 | m_host.ParentGroup.Scene.SimulationDataService.RemoveRegionWindlightSettings(m_host.ParentGroup.Scene.RegionInfo.RegionID); | ||
485 | } | ||
468 | /// <summary> | 486 | /// <summary> |
469 | /// Set the current Windlight scene to a target avatar | 487 | /// Set the current Windlight scene to a target avatar |
470 | /// </summary> | 488 | /// </summary> |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILS_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILS_Api.cs index 9aa437b..f2df094 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILS_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILS_Api.cs | |||
@@ -44,5 +44,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
44 | LSL_List lsGetWindlightScene(LSL_List rules); | 44 | LSL_List lsGetWindlightScene(LSL_List rules); |
45 | int lsSetWindlightScene(LSL_List rules); | 45 | int lsSetWindlightScene(LSL_List rules); |
46 | int lsSetWindlightSceneTargeted(LSL_List rules, key target); | 46 | int lsSetWindlightSceneTargeted(LSL_List rules, key target); |
47 | void lsClearWindlightScene(); | ||
47 | } | 48 | } |
48 | } | 49 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LS_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LS_Stub.cs index f8dbe03..143b497 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LS_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LS_Stub.cs | |||
@@ -72,5 +72,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
72 | { | 72 | { |
73 | return m_LS_Functions.lsSetWindlightSceneTargeted(rules, target); | 73 | return m_LS_Functions.lsSetWindlightSceneTargeted(rules, target); |
74 | } | 74 | } |
75 | public void lsClearWindlightScene() | ||
76 | { | ||
77 | m_LS_Functions.lsClearWindlightScene(); | ||
78 | } | ||
75 | } | 79 | } |
76 | } | 80 | } |