(pln_oneway_to_carrier_ok): New.
(fly, reco): Use it to prevent flying to a carrier that doesn't have space for the planes. Previously, planes that did this were teleported home, which could be abused. (fly): Fail if pln_sel() comes up empty, just like the other commands to fly planes.
This commit is contained in:
parent
ab0d5a87bd
commit
1127762cc1
4 changed files with 66 additions and 2 deletions
|
@ -115,6 +115,10 @@ reco(void)
|
|||
wantflags |= P_ESC;
|
||||
pln_sel(&ni_esc, &esc_list, &ap_sect, ap_to_target,
|
||||
1, wantflags, P_M | P_O);
|
||||
if (cno >= 0 && !pln_oneway_to_carrier_ok(&bomb_list, &esc_list, cno)) {
|
||||
pr("Not enough room on ship #%d!\n", cno);
|
||||
return RET_FAIL;
|
||||
}
|
||||
/*
|
||||
* now arm and equip the bombers, transports, whatever.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue