tend ltend: Fix to skip dead ships and land units for deities
Tending to a dead ship destroys, and tending from a dead ship revives.
Has always been that way. Not actually a problem for ltend anymore,
because the dead can't carry or be carried since commit 64a53c90f0
,
v4.3.17.
Fix by checking !own in addition to !player->owner
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
333cd7d6d3
commit
55643423f6
5 changed files with 20 additions and 22 deletions
|
@ -71,7 +71,7 @@ ltend(void)
|
|||
if (!snxtitem(&tenders, EF_SHIP, player->argp[2], "Tender(s)? "))
|
||||
return RET_SYN;
|
||||
while (nxtitem(&tenders, &tender)) {
|
||||
if (!player->owner) {
|
||||
if (!player->owner || !tender.shp_own) {
|
||||
if (tenders.sel == NS_LIST)
|
||||
pr("You don't own ship #%d!\n", tender.shp_uid);
|
||||
continue;
|
||||
|
@ -100,7 +100,7 @@ ltend(void)
|
|||
return RET_FAIL;
|
||||
total = 0;
|
||||
while (nxtitem(&targets, &target)) {
|
||||
if (!player->owner) {
|
||||
if (!player->owner || !target.lnd_own) {
|
||||
if (targets.sel == NS_LIST)
|
||||
pr("You don't own land unit #%d!\n", target.lnd_uid);
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue