FireWeaponCommand.IsFiring (SpikerSoft.Common/Models/GameServer/CombatCommands.cs:106) is the start/stop switch for energy-weapon beams: ProcessFireWeaponCommandAsync (SpikerSoft.GameServer/Zones/SpaceZone.cs:2558) starts continuous fire when IsFiring == true and stops it when false.
But the MessagePack command parser never reads it — PopulateFireWeaponCommand (SpikerSoft.GameServer/Network/MessagePackSerializer.cs:1940) parses weaponId + directionX/Y/Z only, so IsFiring stays at its bool default false for every msgpack client. Result: over the msgpack path (Angular + Godot), FireWeapon on an energy weapon can only ever stop a beam that can never have been started.
The JSON path is unaffected (JsonPacketSerializer.cs:136 binds the whole command via GameServerJsonContext, including isFiring) — which is presumably why this was never noticed.
Found while reviewing spikersoft-games-godot PR #3, which adds a (future-use) fire_weapon(weaponId, isFiring, dir) client helper that sends the field correctly.
`FireWeaponCommand.IsFiring` (SpikerSoft.Common/Models/GameServer/CombatCommands.cs:106) is the start/stop switch for energy-weapon beams: `ProcessFireWeaponCommandAsync` (SpikerSoft.GameServer/Zones/SpaceZone.cs:2558) starts continuous fire when `IsFiring == true` and stops it when `false`.
But the MessagePack command parser never reads it — `PopulateFireWeaponCommand` (SpikerSoft.GameServer/Network/MessagePackSerializer.cs:1940) parses `weaponId` + `directionX/Y/Z` only, so `IsFiring` stays at its `bool` default `false` for every msgpack client. Result: over the msgpack path (Angular + Godot), `FireWeapon` on an energy weapon can only ever *stop* a beam that can never have been started.
The JSON path is unaffected (`JsonPacketSerializer.cs:136` binds the whole command via `GameServerJsonContext`, including `isFiring`) — which is presumably why this was never noticed.
Fix: add to `PopulateFireWeaponCommand`:
```csharp
if (TryGetValue(dict, "isFiring", out var f)) cmd.IsFiring = Convert.ToBoolean(f);
```
Found while reviewing spikersoft-games-godot PR #3, which adds a (future-use) `fire_weapon(weaponId, isFiring, dir)` client helper that sends the field correctly.
Fix is ready in spikersoft-backend PR #517 (CI fully green): PopulateFireWeaponCommand now parses isFiring, with a DeserializeCommand_FireWeapon_MapsIsFiring regression test. Closing once the PR merges (merge is awaiting a human click — the agent's merge action was permission-blocked).
Fix is ready in spikersoft-backend PR #517 (CI fully green): `PopulateFireWeaponCommand` now parses `isFiring`, with a `DeserializeCommand_FireWeapon_MapsIsFiring` regression test. Closing once the PR merges (merge is awaiting a human click — the agent's merge action was permission-blocked).
Resolved in spikersoft-backend PR #517 (merged to master). PopulateFireWeaponCommand now parses isFiring, so energy weapons can start firing via the MessagePack path; regression test added. Closing.
Resolved in spikersoft-backend PR #517 (merged to master). `PopulateFireWeaponCommand` now parses `isFiring`, so energy weapons can start firing via the MessagePack path; regression test added. Closing.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
FireWeaponCommand.IsFiring(SpikerSoft.Common/Models/GameServer/CombatCommands.cs:106) is the start/stop switch for energy-weapon beams:ProcessFireWeaponCommandAsync(SpikerSoft.GameServer/Zones/SpaceZone.cs:2558) starts continuous fire whenIsFiring == trueand stops it whenfalse.But the MessagePack command parser never reads it —
PopulateFireWeaponCommand(SpikerSoft.GameServer/Network/MessagePackSerializer.cs:1940) parsesweaponId+directionX/Y/Zonly, soIsFiringstays at itsbooldefaultfalsefor every msgpack client. Result: over the msgpack path (Angular + Godot),FireWeaponon an energy weapon can only ever stop a beam that can never have been started.The JSON path is unaffected (
JsonPacketSerializer.cs:136binds the whole command viaGameServerJsonContext, includingisFiring) — which is presumably why this was never noticed.Fix: add to
PopulateFireWeaponCommand:Found while reviewing spikersoft-games-godot PR #3, which adds a (future-use)
fire_weapon(weaponId, isFiring, dir)client helper that sends the field correctly.Fix is ready in spikersoft-backend PR #517 (CI fully green):
PopulateFireWeaponCommandnow parsesisFiring, with aDeserializeCommand_FireWeapon_MapsIsFiringregression test. Closing once the PR merges (merge is awaiting a human click — the agent's merge action was permission-blocked).Resolved in spikersoft-backend PR #517 (merged to master).
PopulateFireWeaponCommandnow parsesisFiring, so energy weapons can start firing via the MessagePack path; regression test added. Closing.