halflife-unified-sdk
halflife-unified-sdk copied to clipboard
Rework weapon & ammo iteration
Weapon and ammo iteration currently has an overcomplicated interface because they use 1-based indices.
For weapons id 0 is WEAPON_NONE
, but for ammo types there is no reason why 0 can't be used as a valid ammo type.
The weapons code uses -1
to denote no/invalid ammo types (WEAPON_NOCLIP
is used in some places as well) so this should be reworked to be more consistent.