diff --git a/lib_copter/entities.lua b/lib_copter/entities.lua index 64d86de..8b22364 100644 --- a/lib_copter/entities.lua +++ b/lib_copter/entities.lua @@ -321,7 +321,7 @@ function airutils.logic_heli(self) if self._engine_running == false then fixed_power = 0 end local power_indicator_angle = airutils.get_gauge_angle(fixed_power/10) + 90 local fuel_in_percent = (self._energy * 1)/self._max_fuel - local energy_indicator_angle = (180*fuel_in_percent)-180 --(airutils.get_gauge_angle((self._max_fuel - self._energy)*2)) - 90 + local energy_indicator_angle = (180*fuel_in_percent)-180 if is_attached then if self._show_hud then diff --git a/lib_planes/fuel_management.lua b/lib_planes/fuel_management.lua index 7b45df1..3ae7a5c 100755 --- a/lib_planes/fuel_management.lua +++ b/lib_planes/fuel_management.lua @@ -40,7 +40,14 @@ function airutils.consumptionCalc(self, accel) if self._energy > 0 and self._engine_running and accel ~= nil then local divisor = 700000 if self._fuel_consumption_divisor then divisor = self._fuel_consumption_divisor end - local consumed_power = self._power_lever/divisor + local consumed_power = 0 + if self._rotor_speed then + --is an helicopter + consumed_power = 50/divisor --fixed rpm + else + --is a normal plane + consumed_power = self._power_lever/divisor + end --minetest.chat_send_all('consumed: '.. consumed_power) self._energy = self._energy - consumed_power;