Leave the gun on the floor when its owner dies, and let it be picked up, so losing a round is not five minutes of pistol and the economy has the loop CS actually has.
onKill drops the bomb and nothing else (src/client/world.ts:420): an AK-47 its owner paid $2,700 for evaporates. After two lost rounds both sides are on pistols with money they cannot spend until the next freeze, which is the flattest part of a match right now.
Done looks like
[ ] World gains a pickups list — position, weapon id, the magazine and reserve it had when its owner died — cleared in startRound and capped so a long round cannot grow it without bound.
[ ] On death the victim's current weapon (or their primary, if they died holding a knife — pick one and say which) becomes a pickup at their feet. A knife is never a pickup; the bomb keeps the drop it already has.
[ ] One pick-up rule, written down: with no primary, walking within ~48 units takes it automatically; with a primary already, it takes an explicit use (E), and the gun you were holding becomes a pickup where you stand. Bots use the same automatic rule and get no new logic — their paths already take them past bodies.
[ ] src/client/world.test.ts: a kill leaves exactly one pickup, with the weapon and the magazine its owner had; a pistol-only player walking over it comes away holding it with that ammo; a knife kill leaves nothing; startRound clears the list; a player who already has a primary does not sweep one up by walking over it.
[ ] The next round hands you a working gun: startRound re-arms p.ammo from p.primary/p.secondary, so a picked-up weapon has to be in p.ammo and in the right slot or the round after a pickup starts empty. Test that too.
[ ] A gun on the floor is visible — the renderer draws pickups (the existing bombMesh, or a small box in models.ts), and the HUD says E — take AK-47 when you are standing on one you would have to ask for.
[ ] bun test passes, including src/rl/*; the README's economy paragraph says weapons drop.
The policy's contract again.observe.ts is 32 fixed numbers. A bot's weapon changing mid-round is already inside the observation (it reads currentWeapon and inaccuracy), so that is free; adding anything about pickups to the vector is not, and would make the shipped weights and the win rate on the page disagree.
Pickup logic inside applyInput runs in the RL arena too, which steps applyInput directly at millions of ticks. Keep it a distance test against a short list, and keep the list empty in an arena world (it has no deaths that matter) — check bun test still finishes in a handful of seconds.
Money and capMoney are match.ts's business: a pickup is free, and no reward changes here.
Team check: in this match there is no friendly fire, and there is no rule that a CT cannot use an AK — do not invent one, but do say in the pull what you decided.
Crew
vesper — it is game state and one more thing to draw, tested headlessly.
Leave the gun on the floor when its owner dies, and let it be picked up, so losing a round is not five minutes of pistol and the economy has the loop CS actually has.
onKilldrops the bomb and nothing else (src/client/world.ts:420): an AK-47 its owner paid $2,700 for evaporates. After two lost rounds both sides are on pistols with money they cannot spend until the next freeze, which is the flattest part of a match right now.Done looks like
Worldgains apickupslist — position, weapon id, the magazine and reserve it had when its owner died — cleared instartRoundand capped so a long round cannot grow it without bound.use(E), and the gun you were holding becomes a pickup where you stand. Bots use the same automatic rule and get no new logic — their paths already take them past bodies.src/client/world.test.ts: a kill leaves exactly one pickup, with the weapon and the magazine its owner had; a pistol-only player walking over it comes away holding it with that ammo; a knife kill leaves nothing;startRoundclears the list; a player who already has a primary does not sweep one up by walking over it.startRoundre-armsp.ammofromp.primary/p.secondary, so a picked-up weapon has to be inp.ammoand in the right slot or the round after a pickup starts empty. Test that too.bombMesh, or a small box inmodels.ts), and the HUD saysE — take AK-47when you are standing on one you would have to ask for.bun testpasses, includingsrc/rl/*; the README's economy paragraph says weapons drop.Files I expect to change
src/client/world.ts,src/client/world.test.ts,src/client/renderer.ts,src/client/models.ts,src/client/hud.ts,README.md.Risks
observe.tsis 32 fixed numbers. A bot's weapon changing mid-round is already inside the observation (it readscurrentWeaponandinaccuracy), so that is free; adding anything about pickups to the vector is not, and would make the shipped weights and the win rate on the page disagree.applyInputruns in the RL arena too, which stepsapplyInputdirectly at millions of ticks. Keep it a distance test against a short list, and keep the list empty in an arena world (it has no deaths that matter) — checkbun teststill finishes in a handful of seconds.capMoneyarematch.ts's business: a pickup is free, and no reward changes here.Crew
vesper — it is game state and one more thing to draw, tested headlessly.