Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

iar_mods
Diva Canto 2011-12-29 12:18:22 -08:00
commit b756077269
2 changed files with 13 additions and 5 deletions

View File

@ -153,10 +153,18 @@ namespace OpenSim.Region.CoreModules.World.LightShare
public void SendProfileToClient(IClientAPI client, RegionLightShareData wl)
{
if (m_enableWindlight && m_scene.RegionInfo.WindlightSettings.valid)
if (m_enableWindlight)
{
List<byte[]> param = compileWindlightSettings(wl);
client.SendGenericMessage("Windlight", param);
if (m_scene.RegionInfo.WindlightSettings.valid)
{
List<byte[]> param = compileWindlightSettings(wl);
client.SendGenericMessage("Windlight", param);
}
else
{
List<byte[]> param = new List<byte[]>();
client.SendGenericMessage("WindlightReset", param);
}
}
}
@ -175,8 +183,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare
private void EventManager_OnSaveNewWindlightProfile()
{
if (m_scene.RegionInfo.WindlightSettings.valid)
m_scene.ForEachRootClient(SendProfileToClient);
m_scene.ForEachRootClient(SendProfileToClient);
}
public void PostInitialise()

View File

@ -486,6 +486,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.ParentGroup.Scene.RegionInfo.WindlightSettings.valid = false;
if (m_host.ParentGroup.Scene.SimulationDataService != null)
m_host.ParentGroup.Scene.SimulationDataService.RemoveRegionWindlightSettings(m_host.ParentGroup.Scene.RegionInfo.RegionID);
m_host.ParentGroup.Scene.EventManager.TriggerOnSaveNewWindlightProfile();
}
/// <summary>
/// Set the current Windlight scene to a target avatar