(tran_nuke, tran_plane, set, sell, move): Use military_control().

(tran_plane): Fix message for attempting to transport a plane in a
sector not owned by the player.
This commit is contained in:
Markus Armbruster 2004-08-19 18:12:28 +00:00
parent 766538bc2f
commit ef0060ec57
4 changed files with 17 additions and 79 deletions

View file

@ -95,15 +95,7 @@ move(void)
* goodies in occupied territory.
*/
if (!istest && sect.sct_oldown != player->cnum && vtype != I_MILIT) {
int tot_mil = 0;
struct nstr_item ni;
struct lndstr land;
snxtitem_xy(&ni, EF_LAND, sect.sct_x, sect.sct_y);
while (nxtitem(&ni, (s_char *)&land)) {
if (land.lnd_own == player->cnum)
tot_mil += total_mil(&land);
}
if ((sect.sct_item[I_MILIT] + tot_mil) * 10 < sect.sct_item[I_CIVIL]) {
if (!military_control(&sect)) {
pr("Military control required to move goods.\n");
return RET_FAIL;
}