Don't pass on ChaneWaterHeight event from EventManager is new water height is less than 0

This is to stop bad values and subsequent viewer crashes.
Thanks to Michelle Argus for this patch.
iar_mods
Justin Clark-Casey (justincc) 2011-12-16 21:16:01 +00:00
parent 5d79f857b0
commit 5c4056660f
1 changed files with 6 additions and 0 deletions

View File

@ -1564,6 +1564,12 @@ namespace OpenSim.Region.Framework.Scenes
public void TriggerRequestChangeWaterHeight(float height)
{
if (height < 0)
{
// ignore negative water height
return;
}
RequestChangeWaterHeight handlerRequestChangeWaterHeight = OnRequestChangeWaterHeight;
if (handlerRequestChangeWaterHeight != null)
{