1
0
Fork 0

Fix slowdown when flying with fuel freeze.

Caused by AAR creating a timers that don't get fired and clag up the system.
This commit is contained in:
Richard Harrison 2018-12-15 16:28:07 +01:00
parent 09809d7b10
commit 0200041d74

View file

@ -59,9 +59,9 @@ var update_loop = func {
contactN.setBoolValue(refueling);
if (fuel_freeze)
return settimer(update_loop, UPDATE_PERIOD);
if (fuel_freeze){
return;
}
# sum up consumed fuel
var consumed = 0;
@ -174,7 +174,6 @@ var update_loop = func {
foreach (var e; engines)
e.getNode("out-of-fuel", 1).setBoolValue(out_of_fuel);
aarTimer.restart(UPDATE_PERIOD);
}
var aarTimer = maketimer(UPDATE_PERIOD, update_loop);