We’ve tightened up a lot of core systems this round. Radar orientation now matches real-world compass conventions, the end-of-watch and performance summary flows are stable, and the main menu is finally as quiet as it should be. This patch focuses on cleaning up duplicate listeners, fixing modal logic, and making the UI and audio state bulletproof.
New Features
SoundManager “self-awareness”
Ambient wind and sea sounds now only start in Simulation mode.
Console logs warn if audio is requested outside of the sim.
No more background wind while browsing menus.
Improvements
Radar & Navigation Displays
Radar heading standardized: 0° = ship forward (+Z), increases clockwise.
Ship triangle orientation fixed: north-up mode rotates with heading, heads-up mode stays upright.
Contacts now display in the correct hemisphere (forward = up, aft = down).
Radar rotation direction matches real-world compass (clockwise).
NAV canvas and radar plotting now agree on orientation.
UI & Flow Stability
End-of-Watch relief process is now single-sourced, firing once per watch.
Performance summary always renders values (fallbacks of 0.00/50/0 if stats missing).
“Return to Main Menu” works every time — no dead clicks.
Clicking outside the summary modal now cleanly returns to menu instead of soft-locking.
Auto-restore HUD clicks now only trigger during Simulation (not in menus).
Settings menu is fully wired: open/close from menus or sim, toggles save state, and backdrop clicks dismiss cleanly.
Confirm Relief modal uses AbortController to prevent stacked/duplicate listeners.
Added consistent z-index and pointer-events ordering for overlays, modals, and hosts.
Removed duplicate click feedback draws from NAV map.
Logging breadcrumbs improved: no more circular JSON crashes, cleaner state traces.
Bug Fixes
Fixed ship heading offset in radar update (+Math.PI) to align with compass.
Corrected ctx.rotate logic for radar background to prevent reversed spin.
Fixed contacts being flipped vertically (behind showing forward).
Fixed duplicate event listeners in modals and UI buttons.
Fixed invisible overlay walls blocking clicks after summary.
Fixed trust/stat crashes by initializing defaults safely.
Fixed settings close/confirm buttons not responding on repeated opens.
Changed files in this update