From 8fb7a3543f8f15da65a43065020e9ef397b0faaa Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 9 Aug 2016 22:29:11 +0100 Subject: [PATCH] let physics know about region water level change --- .../CoreModules/World/Estate/EstateManagementModule.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 3ded00c213..56d41a8812 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs @@ -572,6 +572,7 @@ namespace OpenSim.Region.CoreModules.World.Estate bool UseEstateSun, bool UseFixedSun, float SunHour, bool UseGlobal, bool EstateFixedSun, float EstateSunHour) { + double lastwaterlevel = Scene.RegionInfo.RegionSettings.WaterHeight; // Water Height Scene.RegionInfo.RegionSettings.WaterHeight = WaterHeight; @@ -584,6 +585,9 @@ namespace OpenSim.Region.CoreModules.World.Estate Scene.RegionInfo.RegionSettings.FixedSun = UseFixedSun; Scene.RegionInfo.RegionSettings.SunPosition = SunHour; + if(Scene.PhysicsEnabled && Scene.PhysicsScene != null && lastwaterlevel != WaterHeight) + Scene.PhysicsScene.SetWaterLevel(WaterHeight); + Scene.TriggerEstateSunUpdate(); //m_log.Debug("[ESTATE]: UFS: " + UseFixedSun.ToString()); @@ -1471,7 +1475,7 @@ namespace OpenSim.Region.CoreModules.World.Estate Scene.RegionInfo.EstateSettings.FixedSun, (float)Scene.RegionInfo.EstateSettings.SunPosition); - sendRegionInfoPacketToAll(); +// sendRegionInfoPacketToAll(); already done by setRegionTerrainSettings }