This commit is contained in:
PC-20230316NUNE\Administrator
2024-02-02 15:38:13 +08:00
parent 877dca3b43
commit 00f56e11c7
228 changed files with 36944 additions and 20084 deletions

View File

@@ -1,5 +1,6 @@
using Pathfinding.Util;
using System.Collections.Generic;
using Game.Plugins.App.Util;
using UnityEngine;
namespace Pathfinding {
@@ -434,7 +435,7 @@ namespace Pathfinding {
// the chances next time
clearanceRadius *= 0.9f;
// This will pick points in 2D closer to the edge of the circle with a higher probability
dir = Random.onUnitSphere * Mathf.Lerp(newMagn, radius, tests / 5);
dir = JNRandom.onUnitSphere * Mathf.Lerp(newMagn, radius, tests / 5);
dir.y = 0;
tests++;
}
@@ -500,7 +501,7 @@ namespace Pathfinding {
}
// Pick a random node among the ones in the list weighted by their area
float tg = Random.value*tot;
float tg = JNRandom.value*tot;
int v = accs.BinarySearch(tg);
if (v < 0) v = ~v;