diff --git a/sc2/ChangeLog b/sc2/ChangeLog index 11cf660b7..c4665bf7a 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,5 @@ Changes towards version 0.4: +- Corrected number for combat energy when outfitting starship. - SvdB - Added dumping planet info to uqmdebug.c - SvdB - Check language.txt for locale, from Zap - Make it possible to specify the config dir on the command line. diff --git a/sc2/src/sc2code/sis.c b/sc2/src/sc2code/sis.c index 136f56e84..1c255ef4c 100644 --- a/sc2/src/sc2code/sis.c +++ b/sc2/src/sc2code/sis.c @@ -544,7 +544,14 @@ DrawFlagshipStats (void) wsprintf (buf, "%4u", 1 + TURN_WAIT - turn_wait); font_DrawText (&t); t.baseline.y += leading; - wsprintf (buf, "%4u", 240 * energy_regeneration / energy_wait); + { + unsigned int energy_per_10_sec = + (((100 * BATTLE_FRAME_RATE * energy_regeneration) / + (1 + energy_wait)) + 5) / 10; + wsprintf (buf, "%2u.%1u", + energy_per_10_sec / 10, + energy_per_10_sec % 10); + } font_DrawText (&t); t.baseline.y += leading; wsprintf (buf, "%4lu", (fuel / FUEL_TANK_SCALE));