mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
do max of curve instead of min
This commit is contained in:
parent
bbadedbd9f
commit
bdf715d1d4
@ -2,6 +2,8 @@ using System.Collections.Generic;
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using NewHorizons.Utility;
|
using NewHorizons.Utility;
|
||||||
using NewHorizons.External.Modules.VariableSize;
|
using NewHorizons.External.Modules.VariableSize;
|
||||||
|
using System.Linq;
|
||||||
|
using UnityEngine.Assertions.Must;
|
||||||
|
|
||||||
namespace NewHorizons.Builder.Body
|
namespace NewHorizons.Builder.Body
|
||||||
{
|
{
|
||||||
@ -34,11 +36,7 @@ namespace NewHorizons.Builder.Body
|
|||||||
var heightScale = module.size;
|
var heightScale = module.size;
|
||||||
if (module.curve != null)
|
if (module.curve != null)
|
||||||
{
|
{
|
||||||
var modifier = 1f;
|
var modifier = module.curve.Max(pair => pair.value);
|
||||||
foreach (var pair in module.curve)
|
|
||||||
{
|
|
||||||
if (pair.value < modifier) modifier = pair.value;
|
|
||||||
}
|
|
||||||
heightScale = Mathf.Max(0.1f, heightScale * modifier);
|
heightScale = Mathf.Max(0.1f, heightScale * modifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user