Files
tidewall/test/sim/test_weapons.gd.uid
claudeandClaude Opus 5.5 ed46b6e19f B6: Weapon framework and damage model
Weapons fire from the server's own copy of the shooter's eye and look, at the
weapon's fire rate, from the loaded magazine. An empty trigger pull or the
reload button starts a reload of the weapon's reload time from carried
ammunition; switching slots cancels it. Each shot is one or more pellets
scattered evenly inside a spread cone from the "weapons" stream. Spread is the
hip spread (smaller when aiming), plus bloom that builds in sustained fire,
plus a moving or airborne penalty.

Hitscan pellets trace at once in 16 m segments; projectile weapons (the
whaler's longgun and line thrower) spawn entities that fly under gravity and
trace each tick. A trace stops at the first of terrain, a solid (built pieces
and props take the damage) or another player's body. Players lose armor first,
then health; the top of the body takes the weapon's headshot multiplier; and
damage falls off linearly from range_full to range_max. Stats come from
ItemDef, so adding a weapon is a Tuning entry only.

Closes #20

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 17:19:51 -05:00

2 lines
20 B
Plaintext