Fix pln_equip()'s check for foreign civilians
Check the true load instead of the ip parameter. Makes a difference only when callers pass a bogus ip that isn't actually used. Happens for escorts, but then the call can only be reached for deities, because for mortals the transports fail before the escorts.
This commit is contained in:
parent
79154bf0fc
commit
b1dd82fa61
1 changed files with 4 additions and 8 deletions
|
@ -637,14 +637,6 @@ pln_equip(struct plist *plp, struct ichrstr *ip, int flags, char mission)
|
||||||
item = sect.sct_item;
|
item = sect.sct_item;
|
||||||
own = sect.sct_oldown;
|
own = sect.sct_oldown;
|
||||||
}
|
}
|
||||||
if (ip) {
|
|
||||||
if (ip->i_uid == I_CIVIL) {
|
|
||||||
if (pp->pln_own != own) {
|
|
||||||
pr("You don't control those civilians!\n");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (pcp->pl_fuel > item[I_PETROL]) {
|
if (pcp->pl_fuel > item[I_PETROL]) {
|
||||||
pr("%s not enough petrol there!\n", prplane(pp));
|
pr("%s not enough petrol there!\n", prplane(pp));
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -690,6 +682,10 @@ pln_equip(struct plist *plp, struct ichrstr *ip, int flags, char mission)
|
||||||
pr("%s can't contribute to mission\n", prplane(pp));
|
pr("%s can't contribute to mission\n", prplane(pp));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
if (itype == I_CIVIL && pp->pln_own != own) {
|
||||||
|
pr("You don't control those civilians!\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
if (itype != I_NONE) {
|
if (itype != I_NONE) {
|
||||||
#if 0
|
#if 0
|
||||||
/* Supply is broken somewhere, so don't use it for now */
|
/* Supply is broken somewhere, so don't use it for now */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue