In space-game.component.ts, the cloak/stealth keybinding (c) flips clientCloakActive and applies/removes the local cloak shader, then always calls toggleStealth() which sends !currentStealthActive (last-known server stealth).
currentStealthActive is only updated from the stealthStates signal — not from the keypress. A second press before the server ack therefore:
visually uncloaks the local ship (clientCloakActive = false, shader removed)
still sends toggleStealth(true) to the server
Caught by Wave 7 coverage tests: pressing c twice with currentStealthActive === false applies then removes the hull cloak, but GameServerService.toggleStealth is invoked with true both times.
Expected: the server command should follow the client-intended cloak state (or currentStealthActive should be updated locally on keypress) so a second press requests stealth off.
In `space-game.component.ts`, the cloak/stealth keybinding (`c`) flips `clientCloakActive` and applies/removes the local cloak shader, then always calls `toggleStealth()` which sends `!currentStealthActive` (last-known **server** stealth).
`currentStealthActive` is only updated from the `stealthStates` signal — not from the keypress. A second press before the server ack therefore:
- visually uncloaks the local ship (`clientCloakActive = false`, shader removed)
- still sends `toggleStealth(true)` to the server
Caught by Wave 7 coverage tests: pressing `c` twice with `currentStealthActive === false` applies then removes the hull cloak, but `GameServerService.toggleStealth` is invoked with `true` both times.
Expected: the server command should follow the client-intended cloak state (or `currentStealthActive` should be updated locally on keypress) so a second press requests stealth **off**.
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.
In
space-game.component.ts, the cloak/stealth keybinding (c) flipsclientCloakActiveand applies/removes the local cloak shader, then always callstoggleStealth()which sends!currentStealthActive(last-known server stealth).currentStealthActiveis only updated from thestealthStatessignal — not from the keypress. A second press before the server ack therefore:clientCloakActive = false, shader removed)toggleStealth(true)to the serverCaught by Wave 7 coverage tests: pressing
ctwice withcurrentStealthActive === falseapplies then removes the hull cloak, butGameServerService.toggleStealthis invoked withtrueboth times.Expected: the server command should follow the client-intended cloak state (or
currentStealthActiveshould be updated locally on keypress) so a second press requests stealth off.Fixed in
spikersoft-angularPR #823 (a0f0ccd9). Closing.