Immersive Vehicles (Formerly Transport Simulator)

Immersive Vehicles (Formerly Transport Simulator)

4M Downloads

[bug] gun_cooldown variable doesnt return to 0 on automatic firing guns

LauraDarkez opened this issue ยท 7 comments

commented

this was fixed for a while, but is now broken once again. the variable doesnt return to 0 inbetween shots unless you arent firing when the cooldown ends.

commented

I think it's how it's supposed to work? while gun is on cooldown it returns 1
But it would've been nice if we could control it with duration so that it actually can return 0 before cooldown ends

commented

while its cooling down its supposed to return 1, but it should return 0 inbetween the end of the firedelay and the next shot. technically the tick that counts as "fired" should make the cooldown return 0, on anything other than firedelay 1

commented

Question then: should I wait 1 tick until firing from the last firing? Say the fireDelay is 2 ticks, does that mean cooldown is on for 2 ticks, then off for 1 tick while the gun pauses, then on again for 2 ticks? Or does it mean that the gun fires, cooldown is on for 1 tick, then off for 1 tick, then the gun fires again after those 2 ticks and the cycle repeats?

commented

id personally go with option 1

commented

So that means a gun with fireDelay of 2 will fire every 3 ticks? Cause that's what that's implying.

commented

oh wait, nvm, i misunderstood.

commented

Fixed in V22.6.0.