Introduce a LightShare kill packet ans send it when needed. Currently only

understood by AVN v0.3
iar_mods
Melanie 2011-12-24 16:18:01 +01:00
parent f36fe45fa7
commit 5b52440e61
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