JKGDevs / JediKnightGalaxies

Jedi Knight Galaxies (JKG) is a multiplayer shooter with role playing elements, played out in the Star Wars universe. The project is a full conversion game modification for Jedi Knight: Jedi Academy.
https://www.jkgalaxies.net/
GNU General Public License v2.0
34 stars 12 forks source link

DXR6 Disruptor consumes too much ammo while charging and automatically fires #281

Open Silverfang22 opened 6 years ago

Silverfang22 commented 6 years ago

I think it used to have a bigger magazine, but I will investigate to make sure this is the cause and change how much ammo charging consumes if it is.

eezstreet commented 6 years ago

Pretty sure it's the clip size. It used to have a clip size of 10 I think.

Silverfang22 commented 6 years ago

it probably had a much larger magazine before, it's trying to pull 22 ammo from the magazine at full charge and the shot itself consumes 2 ammo from the magazine. That's double its current actual capacity.

At the moment I've simply reduced the amount of ammo it tries to pull, but this does reduce the total amount of damage it can deal... which is still quite high at full charge (against a stormtrooper NPC it was dealing 108 to the chest and 139 for a headshot).

DarthFutuza commented 5 years ago

Need to look through the code on this one, as this is bugged despite fixing the clip size. (eg: Fire one shot with the alternate firing mode, switch back to disruptor mode and charge the shot). It will then fire early automatically without waiting for you to release the shot - so there's some sort of code problem where if there isn't enough ammo to consume for a full charge, the shot fires off early instead of holding the charge. This also happens to other weapons that use charged shots as well if the ammo count is low.

DarthFutuza commented 5 years ago

eezstreet partially fixed this one with 09f8c33 , it no longer automatically fires, but if you have a weapon that uses charging and consumes say 4 ammo, but you only have 3 ammo left in your clip it has a different issue now. Now instead if will just consume the 3 ammo and not fire at all. You can release it early before the "charge finishes" to potentially use the remaining 3 ammo, but if you don't time it perfectly its lost to the void forever.

Silverfang22 commented 5 years ago

it needs to be smart enough to check how much ammo is consumed when shot and stop charging if it will reduce the amount of ammo left in the mag to less than that amount.