John smart

This commit is contained in:
Nick 2022-07-27 23:54:18 -04:00
parent 184a2d4269
commit 5be88e7bfa

View File

@ -76,13 +76,8 @@ namespace NewHorizons.Builder.Props
float relativeHeight = heightMapTexture.GetPixel((int)sampleX, (int)sampleY).r;
height = (relativeHeight * (heightMap.maxHeight - heightMap.minHeight) + heightMap.minHeight);
if (config.Water != null && propInfo.minHeight == null && height < config.Water.size - 1f)
{
// Don't put underwater
// Silly 1 meter thing is for backwards compat
i--;
continue;
}
// By default don't put underwater more than a mater
if (config.Water != null && propInfo.minHeight == null) propInfo.minHeight = config.Water.size - 1f;
if ((propInfo.minHeight != null && height < propInfo.minHeight) || (propInfo.maxHeight != null && height > propInfo.maxHeight))
{