![Flan's Mod Ultimate Stability Edition](https://media.forgecdn.net/avatars/thumbnails/228/314/256/256/637049574570422621.jpeg)
Burst weapons automatically firing after reload
pixelrider2000 opened this issue ยท 13 comments
When you left click (try to shoot with) an empty burst gun and then reload (with R), a burst goes off even though the player didn't make any new inputs after that inital left click when it was still unloaded.
Hope this hasn't been mentioned yet ;)
Probable cause found, both server and client keep track of how many bullets left in a 'burst'. Client counts down each tick regardless of if a bullet was found, and the server will only tick down once it's shot something - so it'll eternally be trying to shoot.
Okay, I believe I've fixed it. Would you mind testing this build to confirm?
Hm, for me it seems to only occur after right clicking, pressing R doesn't have an effect - the code suggests that too. Shall investigate further.
The gun doesn't seem to unwillingly fire anymore after the reload, so it appears to be fixed. Though I've spotted another bug regarding burst guns but I'm sure it's pretty much the same as the last. Basically, once again when you reload the empty gun via left/right click the animations (muzzle flash/bullet ejection) still fire.
Here is a link to a video I recorded that shows exactly what I mean: https://www.mediafire.com/file/6mo530nme45vvjj/Animation+bug.mp4/file
I think I've fixed it, would you mind testing it again, please?
The bug is indeed fixed! But for some reason the previous bug, where the weapon fires unwillingly occured again. Did you just send me an older version or did this bug really sneak in again? ;)
Strange, I haven't been able to reproduce that on my client.. Possible that I sent you a half-built version, I'll send another one now.
Just to make sure, to reproduce:
- Empty gun, no ammo left in inventory
- Right click/reload
- Pickup ammo
- Issue occurs when gun shoots off rounds
eeeee.zip
I think I understand now. It's true that when you left/right click, pick up the ammo and then reload, there is no trouble. The gun only goes off when you spam click your fire button while picking up the ammo (and then reload). So I suppose it's a matter of whether or not you click while you pick up the ammo. I'm of course not sure if that is correct but that makes sence to me :)
Ah, I see. It's not exactly what's wanted, but I can't see it as particularly annoying. Would you like it if it changed, and didn't "queue" up shots while you're reloading?
I was thinking the same, it's probably not that big of a deal! Honestly, I think it depends on how much you value this issue yourself and also if you have the time to deal with such petty problems ;) Maybe you could keep it in the back of your head and just fix it when there is time.