From c1d5487b72a2dcc49ea90d5af33ef34e2ee79989 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 11 Oct 2026 14:24:57 +0200 Subject: [PATCH] PaintModeTests: a pinging ship is not a subject of its own ping, observed through its ally Co-Authored-By: Claude Opus 5.5 --- tests/Aetheria.Shared.Tests/PaintModeTests.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/Aetheria.Shared.Tests/PaintModeTests.cs b/tests/Aetheria.Shared.Tests/PaintModeTests.cs index ec5019de7..f0115ce8c 100644 --- a/tests/Aetheria.Shared.Tests/PaintModeTests.cs +++ b/tests/Aetheria.Shared.Tests/PaintModeTests.cs @@ -270,6 +270,11 @@ public sealed class PaintModeTests : IDisposable Assert.Equal(2 * .3f, Track(c, t), 4); // 5 x 3 x .0002 x 100, its own ping and A's Assert.Equal(2 * .1f, Track(a, t), 4); // 5 x 2 x .0001 x 100, its own ping and C's + // A pinging ship is not a subject of its own ping, wherever its wavefront starts: A sees C once (A's own + // sweep), at C's light of 10 (5 reflected, 5 emitted by the ping) and 100 x sqrt 2 away; and C sees A once. + var apart = length(float2(100, 100)); + Assert.Equal(10 * 2 * .0001f * apart, Track(a, c), 4); + Assert.Equal(10 * 3 * .0002f * apart, Track(c, a), 4); } // Allegiance needs a faction: two factionless ships are not allies, so one hears nothing of the other's ping.