diff --git a/NewHorizons/External/Modules/HeightMapModule.cs b/NewHorizons/External/Modules/HeightMapModule.cs index 089e1279..cfcfdca8 100644 --- a/NewHorizons/External/Modules/HeightMapModule.cs +++ b/NewHorizons/External/Modules/HeightMapModule.cs @@ -33,11 +33,15 @@ namespace NewHorizons.External.Modules /// public string textureMap; + // blame trifid if this ratio is wrong + public const float RESOLUTION_RATIO = 256 / 51f; + /// /// Resolution of the heightmap. /// Higher values means more detail but also more memory/cpu/gpu usage. + /// This value will be 1:1 with the heightmap texture, but only at the equator. /// - [Range(0, int.MaxValue)] [DefaultValue(51)] - public int resolution = 51; + [Range(0, int.MaxValue)] [DefaultValue((int)(51 * RESOLUTION_RATIO))] + public int resolution = (int)(51 * RESOLUTION_RATIO); } } \ No newline at end of file diff --git a/NewHorizons/Handlers/PlanetCreationHandler.cs b/NewHorizons/Handlers/PlanetCreationHandler.cs index 261f9e2a..51ddbac6 100644 --- a/NewHorizons/Handlers/PlanetCreationHandler.cs +++ b/NewHorizons/Handlers/PlanetCreationHandler.cs @@ -466,7 +466,7 @@ namespace NewHorizons.Handlers if (body.Config.HeightMap != null) { - HeightMapBuilder.Make(go, sector, body.Config.HeightMap, body.Mod, body.Config.HeightMap.resolution); + HeightMapBuilder.Make(go, sector, body.Config.HeightMap, body.Mod, (int)(body.Config.HeightMap.resolution / HeightMapModule.RESOLUTION_RATIO)); } if (body.Config.ProcGen != null)