Hygiene B0-B1: correctness & latent traps
- Restore swallowed [Test] on EnemyAIMathTests.SlideVelocity_DegenerateNormal_DeflectsToTangent (dead regression guard for the shipped enemy-stuck-on-cover fix; now runs + passes). - Extract shared HarvestMath.DepositYield used by ResourceHarvestSystem + MeleeComboSystem; fixes melee mining silently ignoring per-item StackMax (it hard-coded DefaultStackMax) and hoists the melee ledger-buffer fetch out of the per-target loop. - StatMath.Apply switches on the raw byte (case (byte)ModOp.X) instead of casting to the enum inside the Bursted fold — removes the latent cross-assembly enum-in-Burst ICE trap. - Add [Min] guards on CycleDirectorAuthoring loss-critical ints (CoreIntegrityMax>=1 so a mis-authored 0 can't bake an instant-loss core; siege sizes >=0). 456/456 EditMode tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -104,7 +104,8 @@ namespace ProjectM.Tests
|
||||
Assert.AreEqual(0f, slid.y, Eps);
|
||||
}
|
||||
|
||||
public void SlideVelocity_DegenerateNormal_DeflectsToTangent()
|
||||
[Test]
|
||||
public void SlideVelocity_DegenerateNormal_DeflectsToTangent()
|
||||
{
|
||||
// A degenerate (zero / near-vertical) normal has no defined slide plane. The mover must NOT keep driving
|
||||
// straight into the wall (the enemy-stuck-on-cover-rock bug) -> it deflects to a horizontal tangent of the
|
||||
|
||||
Reference in New Issue
Block a user