halflife-unified-sdk icon indicating copy to clipboard operation
halflife-unified-sdk copied to clipboard

Rework weapon & ammo iteration

Open SamVanheer opened this issue 1 year ago • 0 comments

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.

SamVanheer avatar Jun 26 '23 14:06 SamVanheer