Fix bogus message when deity attempts to march foreign land unit
Much of the code assumes that only the land unit's owner can march it. The assumption is correct, because lnd_mar() leaves foreign land units behind with a bogus "was disbanded at" message (suppressed for country It would be nice to let deities march foreign land units, but the assumption is not trivial to remove. For now, just avoid the bogus message. Historical note: it looks like deities used to be able to march foreign land units just fine until Empire 2 factored common code out of navigate, sail and autonav, and updated march to match navigate. Likewise, it looks like they could board with foreign land units until Empire 2 factored out common ground combat code. Commands attack and assault have always rejected foreign land units, even for deities.
This commit is contained in:
parent
8c502d40c6
commit
7499d0bdee
1 changed files with 6 additions and 1 deletions
|
@ -404,7 +404,12 @@ lnd_sel(struct nstr_item *ni, struct emp_qelem *list)
|
|||
|
||||
emp_initque(list);
|
||||
while (nxtitem(ni, &land)) {
|
||||
if (!player->owner)
|
||||
/*
|
||||
* It would be nice to let deities march foreign land units,
|
||||
* but much of the code assumes that only the land unit's
|
||||
* owner can march it.
|
||||
*/
|
||||
if (land.lnd_own != player->cnum)
|
||||
continue;
|
||||
if (opt_MARKET) {
|
||||
if (ontradingblock(EF_LAND, &land)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue