From 8abf5d082dd5747e8b659443ab5db7be69fbe077 Mon Sep 17 00:00:00 2001 From: Alexsandro Percy Date: Sun, 2 Jul 2023 18:15:18 -0300 Subject: [PATCH] hud fuel gauge fixed --- lib_planes/entities.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib_planes/entities.lua b/lib_planes/entities.lua index 438bc75..c4b9ac5 100644 --- a/lib_planes/entities.lua +++ b/lib_planes/entities.lua @@ -468,7 +468,8 @@ function airutils.logic(self) --adjust power indicator local power_indicator_angle = airutils.get_gauge_angle(self._power_lever/10) + 90 - local energy_indicator_angle = (airutils.get_gauge_angle((self._max_fuel - self._energy)*2)) - 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 if is_attached then if self._show_hud then