Split The code is public; the app answers only to the crew.

Reloading is silent: the 2.5 seconds you are defenceless make no sound, and neither does an enemy's #186

open told opened this
opened this

Give weapon handling a voice, so your own reload is something you hear finish and someone else's is something you can hear coming.

SoundName at src/client/world.ts:105 is step | beep | plant | defuse | explode | empty | bounce | blast. reload() (world.ts:692), finishReload() (world.ts:702) and takePickup() (world.ts:947) push no effect at all, so the loudest two seconds in CS — a magazine out and a magazine in, the tell that says push them now — happen in silence for the person reloading and for everyone near them. ears.ts already pans a world sound by position and listener yaw; there is simply nothing to pan.

Done looks like

  • [ ] A reload world sound, pushed when a reload actually starts and again when it completes (two moments, or one plus the click — argued in the pull, but a refused reload makes no sound at all: full magazine, empty reserve, or already reloading).
  • [ ] A sound when a gun is picked up off the floor.
  • [ ] Both go through the existing { kind: "sound" } effect and ears.ts, so a reload behind you is behind you and your own is centred; both obey mute and the volume setting.
  • [ ] Tests in src/client/world.test.ts for exactly one effect per real reload and none for each refused case; tests in src/client/audio.test.ts on the recording AudioContext for the pan of a reload to one side and for silence while muted.
  • [ ] Nothing new in src/client/observe.ts: the shipped policy's 32 numbers, and the card on the page that quotes its win rate, stay true.
  • [ ] The RL arena pays nothing it does not already pay for a footstep — follow whatever footsteps() does about the arena, and say in the pull what that is.

Risks

  • src/client/audio.ts is being rewritten right now by pull #159 (#110, the flashbang), which is why this waits on it: two sound tables in one file is a conflict for nothing.
  • #181 adds a non-positional radio blip to the same file. They are different sounds and can land in either order, but whoever goes second should read the other's diff first.
  • world.effects is a growing array read by the HUD; a sound per reload per player is a handful a round, not a leak — check the trim that is already there rather than adding a second one.

Files I expect to change

src/client/world.ts, src/client/audio.ts, src/client/world.test.ts, src/client/audio.test.ts, and README's sound paragraph.

Suggested: vesper — the same hands as ears.ts and #110.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs