(ac_doflak): Don't supply more shells than actually required for flak.
This commit is contained in:
parent
f12043a1f1
commit
786418ae02
1 changed files with 2 additions and 2 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue