I noticed while making custom SWEPS for a gamemode I'm working on there are some useful bindings in the engine that would help immensely without having to manually recreate them just like every other weapon base on the workshop.
[ ] Add binding for m_bReloadsSingly, what this does is when you call DefaultReload it will reload the weapon one bullet at a time instead of all at once. Note: What this attribute does internally is it calls Reload after every shell is loaded and has built-in mid-reload interruption. This is extremely useful if the player wanted to use multiple different reload animations for each bullet inserted!
[ ] CBaseCombatWeapon::FinishReload( void ), DefaultReload calls this after a reload is finished or interrupted if m_bReloadsSingly is set to true, this would be useful to play animations after a successful reload!
[ ] CBaseCombatWeapon::UsesPrimaryAmmo( void )
[ ] CBaseCombatWeapon::UsesSecondaryAmmo( void )
[ ] CBaseCombatWeapon::HasPrimaryAmmo( void )
[ ] CBaseCombatWeapon::HasSecondaryAmmo( void )
[ ] CBaseCombatWeapon::UsesClipsForAmmo1( void )
[ ] CBaseCombatWeapon::UsesClipsForAmmo2( void )
I will also make a note that using DefaultReload sets m_bInReload to true while the weapon is being reloaded, having a function to check for this for example CBaseCombatWeapon::IsReloading( void ) would be useful if the binding for m_bReloadsSingly is added.
Details
I noticed while making custom SWEPS for a gamemode I'm working on there are some useful bindings in the engine that would help immensely without having to manually recreate them just like every other weapon base on the workshop.
I will also make a note that using DefaultReload sets m_bInReload to true while the weapon is being reloaded, having a function to check for this for example CBaseCombatWeapon::IsReloading( void ) would be useful if the binding for m_bReloadsSingly is added.
Note: Every function and attribute I'm asking you to add is in this one file. 😄 Source: https://github.com/ValveSoftware/source-sdk-2013/blob/0d8dceea4310fde5706b3ce1c70609d72a38efdf/mp/src/game/shared/basecombatweapon_shared.cpp#L2119