Fix fly to permit flying civs to a carrier in an occupied sector

Broken in commit 35887222, v4.2.17.
This commit is contained in:
Markus Armbruster 2012-06-23 17:48:19 +02:00
parent 72f1e22b95
commit 41b2fa433f

View file

@ -80,7 +80,8 @@ fly(void)
if (pln_onewaymission(&target, &cno, &wantflags) < 0) if (pln_onewaymission(&target, &cno, &wantflags) < 0)
return RET_SYN; return RET_SYN;
if (ip && ip->i_uid == I_CIVIL && target.sct_own != target.sct_oldown) { if (ip && ip->i_uid == I_CIVIL
&& cno < 0 && target.sct_own != target.sct_oldown) {
pr("Can't fly civilians into occupied sectors.\n"); pr("Can't fly civilians into occupied sectors.\n");
return RET_FAIL; return RET_FAIL;
} }