mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-11-19 17:05:20 +08:00
perf(uxassist): speed up miner search and honor native clearances
Cache which seeds block each candidate for the replacement, repacking and refill passes, skip candidates that can no longer join a greedy pass, test repack option pairs only when reached, and reuse nearby nodes and obstacles across rotations at each candidate position. Recorded snapshots replay to identical layouts in sequential and parallel modes. Exclude positions the game refuses near the landing capsule and EM Rail Ejectors, and keep buried nodes near Dark Fog Planetary Bases buried, as native reform does. Remove the unused placement limit, duplicate ground checks and per-miner GPU buffer syncs; debug snapshots move to schema 3 with clearance rejections.
This commit is contained in:
1 parent
20a3a3a37e
commit
bc8a0b0189
7 files changed
+499
-397
No files matched your search
@@ -29,7 +29,7 @@ internal static class MinerPlacementGeometry
|
||||
}
|
||||
}
|
||||
|
||||
public static bool Intersects(Box a, Box b)
|
||||
public static bool Intersects(in Box a, in Box b)
|
||||
{
|
||||
var delta = b.Center - a.Center;
|
||||
// Reject distant individual colliders before the full separating-axis test. This
|
||||
@@ -50,7 +50,7 @@ internal static class MinerPlacementGeometry
|
||||
!Separated(Vector3.Cross(a.Z, b.Z), delta, a, b);
|
||||
}
|
||||
|
||||
private static bool Separated(Vector3 axis, Vector3 delta, Box a, Box b)
|
||||
private static bool Separated(Vector3 axis, Vector3 delta, in Box a, in Box b)
|
||||
{
|
||||
if (axis.sqrMagnitude < 1e-10f) return false;
|
||||
var radius = a.Extents.x * Mathf.Abs(Vector3.Dot(axis, a.X)) +
|
||||
@@ -62,7 +62,7 @@ internal static class MinerPlacementGeometry
|
||||
return Mathf.Abs(Vector3.Dot(delta, axis)) > radius;
|
||||
}
|
||||
|
||||
public static bool Intersects(Box box, ColliderData collider)
|
||||
public static bool Intersects(in Box box, ColliderData collider)
|
||||
{
|
||||
switch (collider.shape)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user