Verified all 5 call sites for SubtractAmmo (0x522680):
- CTaskWorm: Teleport (0x28)
- CTaskTeam: selected weapon (dynamic)
- FUN_0055F8C0: DamageX2 (0x43), CrateSpy (0x44)
Hook is correct — never triggered because test replay doesn't use
those weapons. No rename needed.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fix: correct WeaponTable layout — no header, add entry fields
InitWeaponTable analysis revealed the weapon table is a flat array of
71 × 0x1D0 = 0x80B0 bytes with NO 16-byte header. The previous struct
had a phantom _header that made address math accidentally correct but
mislabeled the field being checked.
WeaponEntry now has proper fields:
- panel_state (+0x08, init 0xFFFFFFFF)
- defined (+0x10, checked by CheckWeaponAvail)
- availability (+0x24, init 0xFFFFFFFF, then 0/1 per weapon)
- enabled (+0x28, init 1)
check_weapon_avail now reads `entry.defined` instead of misnamed
`entry.name1`. Updated weapon-system.md to match.
Verified: headless PASS (byte-identical), headful 133+3 PASS / 0 FAIL.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>