mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Fibonacci deadass thought his sequence counted rabbits
This commit is contained in:
parent
a3b104ef46
commit
f4b05940e3
@ -25,7 +25,7 @@ namespace NewHorizons.Builder.Props
|
||||
// Works up to planets with 575 radius before capping
|
||||
var numPoints = Math.Min((int)(area * 10), 41666666);
|
||||
|
||||
var points = RandomUtility.FibonacciSphere(numPoints);
|
||||
//var points = RandomUtility.FibonacciSphere(numPoints);
|
||||
|
||||
Texture2D heightMapTexture = null;
|
||||
if (heightMap != null)
|
||||
@ -57,11 +57,7 @@ namespace NewHorizons.Builder.Props
|
||||
else prefab = SearchUtilities.Find(propInfo.path);
|
||||
for (int i = 0; i < propInfo.count; i++)
|
||||
{
|
||||
// Failsafe
|
||||
if (points.Count == 0) break;
|
||||
|
||||
var randomInd = (int)Random.Range(0, points.Count - 1);
|
||||
var point = points[randomInd];
|
||||
var point = Random.insideUnitSphere;
|
||||
|
||||
var height = radius;
|
||||
if (heightMapTexture != null)
|
||||
@ -105,9 +101,6 @@ namespace NewHorizons.Builder.Props
|
||||
|
||||
// Rotate around normal
|
||||
prop.transform.localRotation *= Quaternion.AngleAxis(Random.Range(0, 360), Vector3.up);
|
||||
|
||||
points.QuickRemoveAt(randomInd);
|
||||
if (points.Count == 0) return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user