Interception builds lists of planes that could intercept. Only list
nodes for missiles were freed. Broken since BSD Empire 1.1.
The fix frees interceptors that actually intercepted when
ac_intercept() returns, and the interceptors that didn't when
ac_encounter() returns.
The latter introduces a small bug: it passes planes that didn't fly to
pln_put(). pln_put() expects only planes that actually took off.
Same bug exists in air defense missions. Luckily, it has no ill
effects. To be fixed soon.
if (changed)
writemap(player->cnum);
/* Now, if the bomber and escort lists are empty, we are done */
- if (QEMPTY(bomb_list) && QEMPTY(esc_list)) {
- if (mission_flags & P_A)
- free_shiplist(&head);
- return;
- }
+ if (QEMPTY(bomb_list) && QEMPTY(esc_list))
+ goto out;
/* Something made it through */
/* Go figure out if there are ships in this sector, and who's they are */
}
}
}
+out:
if (mission_flags & P_A)
free_shiplist(&head);
+ for (cn = 1; cn < MAXNOC; cn++) {
+ if (gotilist[cn])
+ pln_put(&ilist[cn]);
+ }
}
static int
ac_airtoair(bomb_list, &int_list);
PR(plane_owner, "\n");
PR(def_own, "\n");
+ pln_put(&int_list);
}
void