Introduce a LightShare kill packet ans send it when needed. Currently only
understood by AVN v0.3avinationmerge
parent
2e07d24199
commit
41f6d6a5ff
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -176,8 +184,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()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue