MiningCut3Tests: pin a chunk's bearing as pose minus the shooter's position (Stryker survivor FireControl.cs:142)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ee24728d11
commit
400db21399
1 changed files with 7 additions and 0 deletions
|
|
@ -747,6 +747,13 @@ public sealed partial class MiningCut3Tests : IDisposable
|
|||
Assert.True(ahead.Bears);
|
||||
Assert.Null(ahead.Subject);
|
||||
Assert.False(aside.Bears);
|
||||
|
||||
// The bearing is the chunk's pose minus the shooter's position: from (100, -100) the side chunk at (150, 0)
|
||||
// is 26 degrees off the nose, though its pose sum with the shooter's position would be far abeam.
|
||||
var nearAt = float2(100, -100);
|
||||
var near = SpawnShip(s, nearAt, sensor: true, weaponRanges: 300f);
|
||||
Tick((shooter, eyeAt), (near, nearAt));
|
||||
Assert.True(FireControl.Solution(near.Weapons.Single(), near, new ChunkId(s.Belts[0], 1)).Bears);
|
||||
}
|
||||
|
||||
// A writable copy of the shipped catalog plus a scratch run store, through a registry scoped to the shipped
|
||||
|
|
|
|||
Loading…
Reference in a new issue