Note: I had to workaround the lack of precision for fuel value (an integer), especially if the factor reduces significantly the consumption.
An intermediate double value consumeAmount accumulates de bits of fuel consumption every 20 ticks ; the 'real' (int) fuel value is decreased only when accumulated fuel consumption is >= 1.0
Note: I had to workaround the lack of precision for fuel value (an integer), especially if the factor reduces significantly the consumption.
An intermediate double value consumeAmount accumulates de bits of fuel consumption every 20 ticks ; the 'real' (int) fuel value is decreased only when accumulated fuel consumption is >= 1.0
Best regards.