(ac_doflak): Don't supply more shells than actually required for flak.

This commit is contained in:
Markus Armbruster 2004-09-17 12:56:48 +00:00
parent f12043a1f1
commit 786418ae02

View file

@ -800,6 +800,8 @@ ac_doflak(struct emp_qelem *list, struct sctstr *from)
gun = from->sct_item[I_GUN]; gun = from->sct_item[I_GUN];
shell = from->sct_item[I_SHELL]; shell = from->sct_item[I_SHELL];
if (gun > 14)
gun = 14;
if (gun > shell * 2) { if (gun > shell * 2) {
shell += supply_commod(from->sct_own, from->sct_x, from->sct_y, shell += supply_commod(from->sct_own, from->sct_x, from->sct_y,
I_SHELL, (gun + 1) / 2 - shell); I_SHELL, (gun + 1) / 2 - shell);
@ -808,8 +810,6 @@ ac_doflak(struct emp_qelem *list, struct sctstr *from)
} }
if (gun > shell * 2) if (gun > shell * 2)
gun = shell * 2; gun = shell * 2;
if (gun > 14)
gun = 14;
gun = 2.0 * tfact(from->sct_own, gun); gun = 2.0 * tfact(from->sct_own, gun);
if (gun > 0) { if (gun > 0) {