let physics know about region water level change
parent
6f5f6431a4
commit
8fb7a3543f
|
@ -572,6 +572,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
bool UseEstateSun, bool UseFixedSun, float SunHour,
|
bool UseEstateSun, bool UseFixedSun, float SunHour,
|
||||||
bool UseGlobal, bool EstateFixedSun, float EstateSunHour)
|
bool UseGlobal, bool EstateFixedSun, float EstateSunHour)
|
||||||
{
|
{
|
||||||
|
double lastwaterlevel = Scene.RegionInfo.RegionSettings.WaterHeight;
|
||||||
// Water Height
|
// Water Height
|
||||||
Scene.RegionInfo.RegionSettings.WaterHeight = WaterHeight;
|
Scene.RegionInfo.RegionSettings.WaterHeight = WaterHeight;
|
||||||
|
|
||||||
|
@ -584,6 +585,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
Scene.RegionInfo.RegionSettings.FixedSun = UseFixedSun;
|
Scene.RegionInfo.RegionSettings.FixedSun = UseFixedSun;
|
||||||
Scene.RegionInfo.RegionSettings.SunPosition = SunHour;
|
Scene.RegionInfo.RegionSettings.SunPosition = SunHour;
|
||||||
|
|
||||||
|
if(Scene.PhysicsEnabled && Scene.PhysicsScene != null && lastwaterlevel != WaterHeight)
|
||||||
|
Scene.PhysicsScene.SetWaterLevel(WaterHeight);
|
||||||
|
|
||||||
Scene.TriggerEstateSunUpdate();
|
Scene.TriggerEstateSunUpdate();
|
||||||
|
|
||||||
//m_log.Debug("[ESTATE]: UFS: " + UseFixedSun.ToString());
|
//m_log.Debug("[ESTATE]: UFS: " + UseFixedSun.ToString());
|
||||||
|
@ -1471,7 +1475,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
Scene.RegionInfo.EstateSettings.FixedSun,
|
Scene.RegionInfo.EstateSettings.FixedSun,
|
||||||
(float)Scene.RegionInfo.EstateSettings.SunPosition);
|
(float)Scene.RegionInfo.EstateSettings.SunPosition);
|
||||||
|
|
||||||
sendRegionInfoPacketToAll();
|
// sendRegionInfoPacketToAll(); already done by setRegionTerrainSettings
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue