Replace pln_oneway_to_carrier_ok() by pln_can_land_on_carrier()
Avoids reading the target ship again.
This commit is contained in:
parent
d9a915a05b
commit
b4acb73fd1
4 changed files with 13 additions and 12 deletions
|
@ -87,7 +87,8 @@ reco(void)
|
|||
P_M | P_O);
|
||||
pln_sel(&ni_esc, &esc_list, &ap_sect, ap_to_target, 1,
|
||||
wantflags | P_ESC | P_F, P_M | P_O);
|
||||
if (cno >= 0 && !pln_oneway_to_carrier_ok(&bomb_list, &esc_list, cno)) {
|
||||
if (cno >= 0
|
||||
&& !pln_can_land_on_carrier(&bomb_list, &esc_list, &target.ship)) {
|
||||
pr("Not enough room on ship #%d!\n", cno);
|
||||
return RET_FAIL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue