From d00d1580071f2844bfe613a2407d846ea4b67b0b Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 29 Sep 2026 20:42:30 +0200 Subject: [PATCH] Pin the flight distance of a pushed-out no-lock round The mutation pass on the fuse fixes left one survivor: a no-lock round whose aim ends inside the blast radius (a designated target out of arc) flew only to its aimed point instead of the arming distance, and nothing noticed. Its arrival is now pinned to the arming distance, beside the targeted case. Co-Authored-By: Claude Opus 5.5 --- .../FireControlCut124Tests.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/Aetheria.Shared.Tests/FireControlCut124Tests.cs b/tests/Aetheria.Shared.Tests/FireControlCut124Tests.cs index 16f663b58..d55bc6df6 100644 --- a/tests/Aetheria.Shared.Tests/FireControlCut124Tests.cs +++ b/tests/Aetheria.Shared.Tests/FireControlCut124Tests.cs @@ -1573,6 +1573,25 @@ public sealed class FireControlCut124Tests : IDisposable Assert.Equal(1.5f, shot.ArrivalTime - shot.FireTime, 3); } + // The same for a no-lock round: a target 10 out behind a mount whose arc is closed is designated but out of + // arc, so the round flies the aim to the target's range, inside the blast radius, and is pushed out to 30. It + // arrives after 30 units at 20 units/s, not after the 10 it was aimed at. Kills: a no-lock flight distance + // that ignores the arming distance. + [Fact] + public void APushedOutNoLockRoundDoesNotArriveBeforeItHasFlownTheArmingDistance() + { + var e = Build(TestSettings(), SolidShape(5, 4), velocity: 20f, fuse: WeaponFuse.Proximity, blastRadius: 30f, damage: 100f, + weaponRange: 60f, targetRange: 10f); + e.Shooter.Direction = float2(0, -1); + Aim(e, float2(0, -1)); + + FireControl.Fire(e.Weapon, e.WeaponItem, e.Shooter); + + var shot = SafeAssert.OnlyShot(e.Zone); + Assert.True(shot.Target == null, "fixture: out of arc, the round carries no target"); + Assert.Equal(1.5f, shot.ArrivalTime - shot.FireTime, 3); + } + // What the shooter's own hull takes from one round at `targetRange`, counting only rounds that hit when the // fuse needs a hit (a roll can miss, so it retries). private static float ShooterSplash(Engagement e, bool needsHit)