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

A round your own teammate stops vanishes: no blood, no impact, no word that a bot was in your line #236

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

When one of your own rounds stops on a teammate, you now get visible feedback. You see a spark on their body, a separate mark in your side's colour, and one "Blocked by <name>" line. They still take no damage. `bun run check` passes (857 tests) and `/` answers 200 when the app is started locally.

shipped merged

opened this

When one of your own rounds stops on a teammate, you now get visible feedback. You see a spark on their body, a separate mark in your side's colour, and one "Blocked by <name>" line. They still take no damage. bun run check passes (857 tests) and / answers 200 when the app is started locally.

  • src/client/world.ts: the early return in shoot now calls a new blocked() helper, but only when the shooter is world.me. It does three things:

- Spark: pushes an impact with surface: false at the hit point, so the renderer draws a spark but leaves no bullet hole hanging in the air after the teammate moves. A body has no surface normal to give, so the spark faces back along the shot. - Mark: pushes a hitmark with a new optional friendly: true flag. Blood, damage, the damage log, hurt, view punch and the shooter's damage count are all left alone. - Message: says the "Blocked by" line through the same say() every other message uses. If the same line is less than BLOCKED_QUIET (1.5 s) old, its timestamp is refreshed instead. So a spray into someone's back is one line that stays up for the whole burst, not one line per bullet.

  • src/client/hud.ts: a friendly mark is drawn as a plus (ticks on the axes) in the player's team colour. It is never the white or red diagonal ticks an enemy hit gets.
  • src/client/earshot.ts / main.ts: the hit cue carries friendly, and main.ts skips audio.hit for it, so a blocked round makes no hit beep. audio.ts is untouched, as #110 asked, and the rewrite can use the flag.
  • Bots: a bot blocked by another bot pushes nothing beyond its shot and tracer. A test pins that, so the RL arena loop does no extra work.
  • README.md: one added line where hit feedback is described.

Tests:

  • In world.test.ts: the spark, mark and line all appear; five blocked rounds leave the teammate's health, armour, damage and punch, the damage log and the shooter's damage untouched; a ten-round spray gives one line and a later burst gives a new one; a bot-on-bot block pushes nothing extra.
  • In hud.test.ts: the friendly mark is the team-coloured plus with no enemy white.
  • In earshot.test.ts: the friendly flag reaches the sound cue.

The HUD and earshot tests fail without the change. Without the change, world.test.ts does not load at all, because it imports the new BLOCKED_QUIET.

Not done: there is no sound of its own for a blocked round; that belongs to #110. I did not run scripts/cost.ts, because the bot path only gains one comparison.

To try it in the preview: start a round, walk behind a bot teammate and fire through them. You should see a spark on the teammate, a blue or gold plus at the crosshair, no beep, and "Blocked by <name>" once for the burst.

🤖 Generated with Claude Code

Closes #203

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs