]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commit
Reloadable shotgun: fix primary fire triggering melee attack too if clip has some...
authorterencehill <piuntn@gmail.com>
Tue, 9 Aug 2022 13:33:11 +0000 (15:33 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 9 Aug 2022 13:33:11 +0000 (15:33 +0200)
commit09d3573b87c08567886675c532b71c1c7db27ddb
tree5701b24432df1eef55f9d1c9b882d1bd9df86b4d
parent3e10a8008e2757e671301b38bdc6f81a26ceb637
Reloadable shotgun: fix primary fire triggering melee attack too if clip has some ammo but player has none

Implementation notes:
- the first return was added to fix only the case where clip has exactly 1 bullet but player has none
- the second return was added for consistency's sake and avoids wasting a couple checks because if(WEP_CVAR(shotgun, secondary) == 1) will always return false
qcsrc/common/weapons/weapon/shotgun.qc