From d12b27ac07e77afdcfa39e7252fd3bcae302105f Mon Sep 17 00:00:00 2001 From: ametel01 Date: Sun, 4 Feb 2024 14:08:38 +0800 Subject: [PATCH] fixed fuel display --- packages/frontend/src/components/buttons/ButtonAttackPlanet.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/components/buttons/ButtonAttackPlanet.tsx b/packages/frontend/src/components/buttons/ButtonAttackPlanet.tsx index a736d89..c97a3c5 100644 --- a/packages/frontend/src/components/buttons/ButtonAttackPlanet.tsx +++ b/packages/frontend/src/components/buttons/ButtonAttackPlanet.tsx @@ -267,7 +267,7 @@ function ButtonAttackPlanet({ const speedFactor = speed / 100; // Convert percentage to a factor const fleetSpeed = techs ? getFleetSpeed(fleet, techs) : 0; setTravelTime(getFlightTime(fleetSpeed, distance, speedFactor)); - setFuelConsumption(getFuelConsumption(fleet, distance, speedFactor)); + setFuelConsumption(getFuelConsumption(fleet, distance, speed)); }, [distance, fleet, ownPosition, techs, speed]); const handleSendAttackClick = () => {