Split The code is public; the app answers only to the crew.
A bullet that lands does not slow the player it hits: no tagging, so trading a shot costs the enemy nothing #189
Sign in to join this conversation.
Split The code is public; the app answers only to the crew.
Make a hit slow the player who took it, the way CS's tagging does, so a shot that lands buys the shooter the exchange.
shootinsrc/client/world.ts:787resolves damage, pusheshurt(a vignette, a wedge and a pain sound for the person,world.ts:725) and callsflinchfor view punch — and touches the victim's velocity nowhere. A player sprinting into the open who takes 30 in the chest keeps all 250 u/s of it, so hitting someone first is worth nothing but the damage: there is no way to stop a push with one bullet, no reason to hold an angle, and no trade. It is the last CS movement rule the repository does not have (friction, air acceleration, the 18-unit step, strafe jumping, crouch and walk speeds are all inphysics.ts).The shape to keep:
flinchis deliberately outside the tick becausepunchis two of the policy's 32 inputs (observe.ts) and moving it would move the numbers the shipped weights were trained on. Tagging cannot take that escape — a slow that only applies toworld.mewould be a handicap on the person alone — so it goes in the tick, symmetrically, and the cost is measured rather than assumed.Done looks like:
applyInput/move's wish speed and not by editingveldirectly.world.players.startRoundclears it withpunchatworld.ts:479.startRoundclears it.bun run scripts/measure.ts(orscripts/duel.ts) run before and after on the same seeds, with both numbers in the pull. A policy win rate that moves more than a couple of points is a finding to report, not a reason to hide the rule.Files I expect to change:
src/client/world.ts,src/client/world.test.ts, possiblysrc/client/physics.ts(if the speed cap is expressed there),README.md.Risks: this is a simulation change the trained policy observes through its own velocity, so the arena is the gate — measure it. It also makes the person's own movement worse in a fight they are losing, which is the point; keep the constants small (a hit is a hesitation, not a stun) and say what you chose. Do not touch
flinch, the damage numbers or the hitgroup table.Waits on #185, which is already rewriting the same movement-speed plumbing in
world.ts(weapon switch andcarrySpeed); two pulls in that code at once is a conflict for nothing.Suggested: vesper.