mission: Don't permit SAMs on escort missions
The mission code doesn't treat SAMs specially: they take off, fly out, maybe fight, fly home, and land. Landing triggers the oops in pln_put1(). Letting SAMs escort makes no sense. Fix the mission command to reject them. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
1c7d9a67f6
commit
6f3f78481d
1 changed files with 7 additions and 1 deletions
|
@ -29,7 +29,7 @@
|
|||
* Known contributors to this file:
|
||||
* Thomas Ruschak, 1992
|
||||
* Steve McClure, 2000
|
||||
* Markus Armbruster, 2005-2016
|
||||
* Markus Armbruster, 2005-2021
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
@ -222,6 +222,12 @@ mission(void)
|
|||
struct plchrstr *pcp;
|
||||
|
||||
pcp = &plchr[(int)gp->type];
|
||||
if (pcp->pl_flags & P_M) {
|
||||
pr("Missiles can't escort.\n"
|
||||
"%s #%d is ineligible\n",
|
||||
pcp->pl_name, gp->uid);
|
||||
continue;
|
||||
}
|
||||
if (!(pcp->pl_flags & P_ESC) && !(pcp->pl_flags & P_F)) {
|
||||
pr("Only planes with the escort or intercept abilities can escort.\n"
|
||||
"%s #%d is ineligible\n",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue