/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2021, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure, Markus Armbruster
*
* Empire is free software: you can redistribute it and/or modify
*
* Known contributors to this file:
* Dave Pare, 1986
- * Markus Armbruster, 2004-2011
+ * Markus Armbruster, 2004-2012
*/
#include <config.h>
return RET_SYN;
ax = ap_sect.sct_x;
ay = ap_sect.sct_y;
- if (!getpath(flightpath, player->argp[4], ax, ay, 0, 0, MOB_FLY)
- || *flightpath == 0)
+ if (!getpath(flightpath, player->argp[4], ax, ay, 0, 0, MOB_FLY))
return RET_SYN;
tx = ax;
ty = ay;
if (relations_with(target.sct_own, player->cnum) == ALLIED) {
/* own or allied sector: cargo drop */
- if (ip->i_uid == I_CIVIL && target.sct_own != target.sct_oldown) {
- pr("Can't drop civilians into occupied sectors.\n");
- return RET_FAIL;
+ if (ip->i_uid == I_CIVIL) {
+ if (target.sct_own != player->cnum) {
+ pr("Your civilians refuse to board a flight abroad!\n");
+ return RET_FAIL;
+ }
+ if (target.sct_own != target.sct_oldown) {
+ pr("Can't drop civilians into occupied sectors.\n");
+ return RET_FAIL;
+ }
}
wantflags = P_C;
} else {
}
ap_to_target = strlen(flightpath);
- if (flightpath[ap_to_target - 1] == 'h')
- ap_to_target--;
pr("range to target is %d\n", ap_to_target);
/*
* select planes within range