<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40746 >

Veteran and Hardened Workers do not gain work speed because of a
trivial data typing error.

The default ruleset includes
veteran_power_fact = 100, 150, 175, 200

In the file server/ruleset.c this is read in as a double and divided by 100

Hence internally power_fact = 1, 1.5, 1.75, 2

However  in common/unit.c power_fact is cast to an integer just before
the activity rate is calculated

int fact = unit_type(punit)->veteran[punit->veteran].power_fact;

Now  power_fact = 1, 1, 1, 2

The fix is trivial replace the int with a double.



_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to