clear parcels uglysky on clearing override flag
parent
e7807d4359
commit
369a2e1453
|
@ -99,5 +99,6 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id);
|
void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id);
|
||||||
void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id);
|
void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id);
|
||||||
void sendClientInitialLandInfo(IClientAPI remoteClient, bool overlay);
|
void sendClientInitialLandInfo(IClientAPI remoteClient, bool overlay);
|
||||||
|
void ClearAllEnviroments();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1095,8 +1095,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
currentRegionSettings.CacheID = UUID.Random();
|
currentRegionSettings.CacheID = UUID.Random();
|
||||||
currentRegionSettings.Save();
|
currentRegionSettings.Save();
|
||||||
|
|
||||||
scene.TriggerEstateSunUpdate();
|
|
||||||
|
|
||||||
IEstateModule estateModule = scene.RequestModuleInterface<IEstateModule>();
|
IEstateModule estateModule = scene.RequestModuleInterface<IEstateModule>();
|
||||||
if (estateModule != null)
|
if (estateModule != null)
|
||||||
estateModule.sendRegionHandshakeToAll();
|
estateModule.sendRegionHandshakeToAll();
|
||||||
|
|
|
@ -119,10 +119,6 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
|
|
||||||
public void RegionLoaded(Scene scene)
|
public void RegionLoaded(Scene scene)
|
||||||
{
|
{
|
||||||
// Sets up the sun module based no the saved Estate and Region Settings
|
|
||||||
// DO NOT REMOVE or the sun will stop working
|
|
||||||
scene.TriggerEstateSunUpdate();
|
|
||||||
|
|
||||||
UserManager = scene.RequestModuleInterface<IUserManagement>();
|
UserManager = scene.RequestModuleInterface<IUserManagement>();
|
||||||
|
|
||||||
scene.RegionInfo.EstateSettings.DoDenyMinors = !m_ignoreEstateMinorAccessControl;
|
scene.RegionInfo.EstateSettings.DoDenyMinors = !m_ignoreEstateMinorAccessControl;
|
||||||
|
@ -605,8 +601,6 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
if (Scene.PhysicsEnabled && Scene.PhysicsScene != null && lastwaterlevel != WaterHeight)
|
if (Scene.PhysicsEnabled && Scene.PhysicsScene != null && lastwaterlevel != WaterHeight)
|
||||||
Scene.PhysicsScene.SetWaterLevel(WaterHeight);
|
Scene.PhysicsScene.SetWaterLevel(WaterHeight);
|
||||||
|
|
||||||
Scene.TriggerEstateSunUpdate();
|
|
||||||
|
|
||||||
//m_log.Debug("[ESTATE]: UFS: " + UseFixedSun.ToString());
|
//m_log.Debug("[ESTATE]: UFS: " + UseFixedSun.ToString());
|
||||||
//m_log.Debug("[ESTATE]: SunHour: " + SunHour.ToString());
|
//m_log.Debug("[ESTATE]: SunHour: " + SunHour.ToString());
|
||||||
|
|
||||||
|
@ -1529,6 +1523,8 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
|
|
||||||
public void handleEstateChangeInfo(IClientAPI remoteClient, UUID invoice, UUID senderID, UInt32 parms1, UInt32 parms2)
|
public void handleEstateChangeInfo(IClientAPI remoteClient, UUID invoice, UUID senderID, UInt32 parms1, UInt32 parms2)
|
||||||
{
|
{
|
||||||
|
bool lastallowEnvOvr = Scene.RegionInfo.EstateSettings.AllowEnviromentOverride;
|
||||||
|
|
||||||
if ((parms1 & 0x00008000) != 0)
|
if ((parms1 & 0x00008000) != 0)
|
||||||
Scene.RegionInfo.EstateSettings.PublicAccess = true;
|
Scene.RegionInfo.EstateSettings.PublicAccess = true;
|
||||||
else
|
else
|
||||||
|
@ -1578,6 +1574,12 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
Scene.RegionInfo.EstateSettings.DenyMinors = false;
|
Scene.RegionInfo.EstateSettings.DenyMinors = false;
|
||||||
|
|
||||||
Scene.EstateDataService.StoreEstateSettings(Scene.RegionInfo.EstateSettings);
|
Scene.EstateDataService.StoreEstateSettings(Scene.RegionInfo.EstateSettings);
|
||||||
|
|
||||||
|
if (lastallowEnvOvr && Scene.LandChannel != null && !Scene.RegionInfo.EstateSettings.AllowEnviromentOverride)
|
||||||
|
{
|
||||||
|
Scene.ClearAllParcelEnviroments();
|
||||||
|
}
|
||||||
|
|
||||||
TriggerEstateInfoChange();
|
TriggerEstateInfoChange();
|
||||||
|
|
||||||
sendDetailedEstateData(remoteClient, invoice);
|
sendDetailedEstateData(remoteClient, invoice);
|
||||||
|
@ -1590,6 +1592,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
bool alloVoiceChat, bool overridePublicAccess,
|
bool alloVoiceChat, bool overridePublicAccess,
|
||||||
bool allowEnviromentOverride)
|
bool allowEnviromentOverride)
|
||||||
{
|
{
|
||||||
|
bool lastallowEnvOvr = Scene.RegionInfo.EstateSettings.AllowEnviromentOverride;
|
||||||
|
|
||||||
Scene.RegionInfo.EstateSettings.PublicAccess = externallyVisible;
|
Scene.RegionInfo.EstateSettings.PublicAccess = externallyVisible;
|
||||||
Scene.RegionInfo.EstateSettings.AllowDirectTeleport = allowDirectTeleport;
|
Scene.RegionInfo.EstateSettings.AllowDirectTeleport = allowDirectTeleport;
|
||||||
|
@ -1603,6 +1606,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
Scene.RegionInfo.EstateSettings.AllowEnviromentOverride = allowEnviromentOverride;
|
Scene.RegionInfo.EstateSettings.AllowEnviromentOverride = allowEnviromentOverride;
|
||||||
|
|
||||||
Scene.EstateDataService.StoreEstateSettings(Scene.RegionInfo.EstateSettings);
|
Scene.EstateDataService.StoreEstateSettings(Scene.RegionInfo.EstateSettings);
|
||||||
|
if(lastallowEnvOvr && !allowEnviromentOverride)
|
||||||
|
Scene.ClearAllParcelEnviroments();
|
||||||
|
|
||||||
TriggerEstateInfoChange();
|
TriggerEstateInfoChange();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -254,6 +254,13 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
m_landManagementModule.sendClientInitialLandInfo(remoteClient, overlay);
|
m_landManagementModule.sendClientInitialLandInfo(remoteClient, overlay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ClearAllEnviroments()
|
||||||
|
{
|
||||||
|
List<ILandObject> parcels = AllParcels();
|
||||||
|
for(int i=0; i< parcels.Count; ++i)
|
||||||
|
parcels[i].StoreEnviroment(null);
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1984,6 +1984,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
public void StoreEnviroment(ViewerEnviroment VEnv)
|
public void StoreEnviroment(ViewerEnviroment VEnv)
|
||||||
{
|
{
|
||||||
|
int lastVersion = LandData.EnviromentVersion;
|
||||||
LandData.Enviroment = VEnv;
|
LandData.Enviroment = VEnv;
|
||||||
if (VEnv == null)
|
if (VEnv == null)
|
||||||
LandData.EnviromentVersion = -1;
|
LandData.EnviromentVersion = -1;
|
||||||
|
@ -1992,8 +1993,11 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
++LandData.EnviromentVersion;
|
++LandData.EnviromentVersion;
|
||||||
VEnv.version = LandData.EnviromentVersion;
|
VEnv.version = LandData.EnviromentVersion;
|
||||||
}
|
}
|
||||||
m_scene.LandChannel.UpdateLandObject(LandData.LocalID, LandData);
|
if(lastVersion != LandData.EnviromentVersion)
|
||||||
SendLandUpdateToAvatarsOverMe();
|
{
|
||||||
|
m_scene.LandChannel.UpdateLandObject(LandData.LocalID, LandData);
|
||||||
|
SendLandUpdateToAvatarsOverMe();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
void FromLightShare(RegionLightShareData wl);
|
void FromLightShare(RegionLightShareData wl);
|
||||||
RegionLightShareData ToLightShare();
|
RegionLightShareData ToLightShare();
|
||||||
byte[] GetDefaultAssetData(int type);
|
byte[] GetDefaultAssetData(int type);
|
||||||
|
void WindlightRefresh(int interpolate, bool notforparcel = true);
|
||||||
|
|
||||||
float GetRegionDayFractionTime();
|
float GetRegionDayFractionTime();
|
||||||
int GetRegionDayLength();
|
int GetRegionDayLength();
|
||||||
|
|
|
@ -5884,16 +5884,22 @@ Environment.Exit(1);
|
||||||
IEstateDataService estateDataService = EstateDataService;
|
IEstateDataService estateDataService = EstateDataService;
|
||||||
if (estateDataService != null)
|
if (estateDataService != null)
|
||||||
{
|
{
|
||||||
|
bool parcelEnvOvr = RegionInfo.EstateSettings.AllowEnviromentOverride;
|
||||||
RegionInfo.EstateSettings = estateDataService.LoadEstateSettings(RegionInfo.RegionID, false);
|
RegionInfo.EstateSettings = estateDataService.LoadEstateSettings(RegionInfo.RegionID, false);
|
||||||
TriggerEstateSunUpdate();
|
if(parcelEnvOvr && !RegionInfo.EstateSettings.AllowEnviromentOverride)
|
||||||
|
ClearAllParcelEnviroments();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TriggerEstateSunUpdate()
|
public void ClearAllParcelEnviroments()
|
||||||
{
|
{
|
||||||
EventManager.TriggerEstateToolsSunUpdate(RegionInfo.RegionHandle);
|
IEnvironmentModule envM = RequestModuleInterface<IEnvironmentModule>();
|
||||||
|
if(LandChannel != null && envM != null)
|
||||||
|
{
|
||||||
|
LandChannel.ClearAllEnviroments();
|
||||||
|
envM.WindlightRefresh(1,false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleReloadEstate(string module, string[] cmd)
|
private void HandleReloadEstate(string module, string[] cmd)
|
||||||
{
|
{
|
||||||
if (MainConsole.Instance.ConsoleScene == null ||
|
if (MainConsole.Instance.ConsoleScene == null ||
|
||||||
|
|
|
@ -120,5 +120,6 @@ namespace OpenSim.Tests.Common
|
||||||
public void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) {}
|
public void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) {}
|
||||||
public void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) {}
|
public void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) {}
|
||||||
public void sendClientInitialLandInfo(IClientAPI remoteClient, bool overlay) { }
|
public void sendClientInitialLandInfo(IClientAPI remoteClient, bool overlay) { }
|
||||||
|
public void ClearAllEnviroments(){ }
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue