diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 50dc91d98c..e435ac1e8b 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -350,7 +350,10 @@ namespace OpenSim.Region.Physics.OdePlugin } // zero out a heightmap array float array (single dimention [flattened])) - _heightmap = new float[514*514]; + if ((int)Constants.RegionSize == 256) + _heightmap = new float[514*514]; + else + _heightmap = new float[(((int)Constants.RegionSize + 2) * ((int)Constants.RegionSize + 2))]; _watermap = new float[258 * 258];