Fix flying commands not to let planes do double duty as escorts
Commit7ca4f412
(v4.3.12) marked planes flying a sortie with PLN_LAUNCHED, and made pln_arm() reject planes with that flag set. This was designed to reject escorts that were already flying as bombers. It didn't work, because the test for PLN_LAUNCHED used a stale copy of the plane created by pln_sel(). Fix by getting a fresh copy. The bug always existed, but the botched fix in commit7ca4f412
made it worse. Before, ac_encounter() dropped escorts that were also bombers, so the bug merely wasted plane fuel. After, such planes were effectively duplicated, and damage to one of them, usually the bomber, was wiped out. Abusable. (cherry picked from commit801780043f
)
This commit is contained in:
parent
fbefc139f4
commit
84d40a6057
1 changed files with 1 additions and 0 deletions
|
@ -559,6 +559,7 @@ pln_arm(struct emp_qelem *list, int dist, char mission, struct ichrstr *ip,
|
||||||
next = qp->q_forw;
|
next = qp->q_forw;
|
||||||
plp = (struct plist *)qp;
|
plp = (struct plist *)qp;
|
||||||
pp = &plp->plane;
|
pp = &plp->plane;
|
||||||
|
getplane(pp->pln_uid, pp);
|
||||||
if ((pp->pln_flags & PLN_LAUNCHED)
|
if ((pp->pln_flags & PLN_LAUNCHED)
|
||||||
|| pln_equip(plp, ip, flags, mission) < 0) {
|
|| pln_equip(plp, ip, flags, mission) < 0) {
|
||||||
emp_remque(qp);
|
emp_remque(qp);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue