Page 1 of 1

[1.1.76] Positive flamethrower gun speed bonus does not affect fluid consumption of flamethrower turret

Posted: Sun Feb 19, 2023 1:52 am
by Atraps003
When flamethrower gun speed modifier is set to a value lower than default the fluid consumption of the flamethrower turret decreases from default consumption as expected.

When flamethrower gun speed modifier is set to a value higher than default the fluid consumption of the flamethrower turret does not increase from default.


Commands used in video.

/c game.forces["player"].set_gun_speed_modifier("flamethrower", -0.95)
/c game.forces["player"].set_gun_speed_modifier("flamethrower", 0)
/c game.forces["player"].set_gun_speed_modifier("flamethrower", 10)

flamethrower-turret-bug.mp4
(27.75 MiB) Downloaded 41 times

Re: [1.1.76] Positive flamethrower gun speed bonus does not affect fluid consumption of flamethrower turret

Posted: Wed Mar 15, 2023 12:03 pm
by boskid
Thanks for the report. This is not a bug. Flamethrower turret shooting speed is limited by the value of FluidTurret::ending_attack_speed which means a fluid turret is only able to shoot every 4 ticks (since ending_attack_speed=0.2, 3 ticks will be required only to increase the progress, and in 4th tick, the progress will be increased from 0.8 to 1 causing it to immediately go to Prepared state which it immediately resolves by going to StartAttacking state which it immediately resolves going to Attacking state in which case it spits the flame and goes into EndingAttack state and it updates it once). With negative speed modifier it works correctly because of the shooter's cooldown working independently from the EndingAttack progress.