[BUG?] AutoReload handguns do NOT wait. Even a second. Jeeesuuus.
boot2big opened this issue ยท 8 comments
2022-09-15.05-14-39.mp4
2022-09-15.05-15-04.mp4
Testing is to be done with devmode disabled however, just in case.
Nothing urgeeent though... it is kinda fun.
Is confirmed to not be a bug, just slight confusion as to how reloadDelay and fireDelay work.
Odd, what's the JSON for the paramters look like? This looks like the reload time is 0, so you're not getting a delay.
"handHeld": true,
"isSemiAuto": true,
"autoReload": true,
"capacity": 6,
"reloadTime": 5,
"muzzleVelocity": 1100,
"fireDelay": 6.0,```
It has a short load delay but not *0* because I figured the gun couldn't fire while reloading, and that you'd want to actually spend your time loading up the gun to fire much quicker shots rather than trying to load a single shot, fire it, then reload again.
So looking at this, it seems like the reload time is 5 ticks, and the fire delay is 6 ticks. That means that you'll only have 6 ticks between shots, or ~1/4 of a second.
The thought process behind that though was that you wouldn't be able to fire when the gun is busy reloading, meaning the total reload time would've been 30 ticks. Still a fairly short time for a revolver, but a cooldown-and-reload time nonetheless.
See, that's not how gun code runs. It runs the cooldown and reloading timers simultaniously. That's required for guns that can take ammo while being fired, like clip-based SMGs or gattling guns. Cooldown (fireDelay) is a pure indicator of how many ticks pass between each firing, and reloading is just for the reloading of bullets. They don't mix.
Well I'll just have to set the reload time to 10 or 20 then, at least so that spam firing isn't as viable as vid related.