From 0e73bbac728daab465d92bf17ff116e7c9aec0d8 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 29 Sep 2026 21:23:04 +0200 Subject: [PATCH] Read the pending burst, not Progress, as the mark that Trigger ran; sound the charged control by its own event The cooldown now starts at a burst's first fired round, so Progress no longer moves at the trigger. IffAndCombatTests read CanFire (false while a burst is pending) instead, and the charged-weapon control uses the charge-start event name the sound bank resolves. Co-Authored-By: Claude Opus 5.5 --- tests/Aetheria.Shared.Tests/FireControlPerWeaponTests.cs | 2 +- tests/Aetheria.Shared.Tests/IffAndCombatTests.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Aetheria.Shared.Tests/FireControlPerWeaponTests.cs b/tests/Aetheria.Shared.Tests/FireControlPerWeaponTests.cs index 70d083e27..f61c75fe9 100644 --- a/tests/Aetheria.Shared.Tests/FireControlPerWeaponTests.cs +++ b/tests/Aetheria.Shared.Tests/FireControlPerWeaponTests.cs @@ -652,7 +652,7 @@ public sealed class FireControlPerWeaponTests : IDisposable r.Shooter.Target.Value = null; Aim(r, float2(0, 1)); var weapon = (ChargedWeapon) r.Gun.Weapon; - r.Gun.Item.SoundBank = new WwiseMetaSoundBank { IncludedEvents = new[] { new WwiseMetaObject { Id = 7, Name = "gun_fire" } } }; + r.Gun.Item.SoundBank = new WwiseMetaSoundBank { IncludedEvents = new[] { new WwiseMetaObject { Id = 7, Name = "gun_charge_play" } } }; var starts = 0; var sounds = 0; weapon.OnStartCharging += () => starts++; diff --git a/tests/Aetheria.Shared.Tests/IffAndCombatTests.cs b/tests/Aetheria.Shared.Tests/IffAndCombatTests.cs index 6c01aafc9..1d3863b50 100644 --- a/tests/Aetheria.Shared.Tests/IffAndCombatTests.cs +++ b/tests/Aetheria.Shared.Tests/IffAndCombatTests.cs @@ -250,7 +250,7 @@ public sealed class IffAndCombatTests : IDisposable weapon.Activate(); - Assert.Equal(0f, weapon.Progress); // Trigger() was safed: no cooldown/burst was started + Assert.True(weapon.CanFire); // Trigger() was safed: no burst was started } [Fact] @@ -266,7 +266,7 @@ public sealed class IffAndCombatTests : IDisposable weapon.Activate(); - Assert.Equal(1f, weapon.Progress); // Trigger() ran: cooldown/burst started + Assert.False(weapon.CanFire); // Trigger() ran: a burst is pending } [Fact] @@ -279,7 +279,7 @@ public sealed class IffAndCombatTests : IDisposable weapon.Activate(); - Assert.Equal(1f, weapon.Progress); + Assert.False(weapon.CanFire); // Trigger() ran: a burst is pending } [Fact]